- You cannot share cookies across domains. You can, however, allow all subdomains to have access. To allow all subdomains of example.com to have access, set the domain to .yourmaincompanydomain.com.
It's not possible giving externaldomain.com access to yourmaincompanydomain.com's cookies though.
- Using Javascript you have to resolve cross domain issue(iframe and few more thing to ensure works properly in a distribute domain) and few more issues but server to server you can read using cookie api(recommended)
One more thing, regarding dispatcher items: you can not accomplish what are you looking for.
The dispatcher has the following configuration:
- stickyConnection: Sticky connections ensure that session data is present and consistent for all documents.Dispatcher sends all requests, from a single user, that are in this folder to the same render instance.
- http header supported : /clientheaders property defines a list of HTTP headers that Dispatcher passes from the client HTTP request to the renderer (AEM instance).
- setup secure session(session managements)- Create a secure session for access to the render farm so that users need to log in to access any page in the farm. After logging in, users can access all pages in the farm. In particularly for header(/header), the name of the HTTP header or cookie that stores the authorization information. If you store the information in the http header, use HTTP:<header-name>.
- caching authenticated user depend on cookie heder
- configure load balance base on cookie value