The idea of implementing SSO across the primary domain. The idea of implementing SSO across primary domains is that the same primary domain (that is, all subdomains under the same level-1 domain name) includes multiple server sharing SESSION data implementation methods, I will not talk about it here! The idea of implementing SSO across main domains
The same primary domain (that is, all subdomains under the same level-1 domain name) includes multiple server sharing SESSION data implementation methods, which are not described here!
The key issue is the implementation of SSO in different primary domains! This problem is complicated and can be implemented, but many of them are supported by some special software systems...
In fact, SESSION also requires COOKIE support. If COOKIE does not support cross-primary domain, the SESSION cannot cross-primary domain! So, how to implement cross-primary domain ???
This is a simple method that I suddenly think of when implementing SSO in my project.
I. assume there is. COM, B. COM, C. COM, where. COM is mainly responsible for verifying the pass (fast), B. COM and C. COM is a specific application
2. Some applications of B. COM, C. COM, and A. COM require A. COM to gain trust (login)
3. assign A subdomain passport. B. COM and passport. C. COM to each primary domain. their IP addresses all point to the host address of A. COM.
4. after the login passes verification, the user sets up a jump rule with session_id as the parameter to jump to the passport one by one. b. COM, passport. c. COM (in fact, these subdomains can be built to the default site of host A, and can be quickly redirected one by one through arrays and some parameters), jump directly using the PHP header ("Location: passport. b. COM /? Sid = xxxxxxxx & I = 0 "); at the same time, overwrite the session_id of the current primary domain as the passed session_id.
Here are some considerations:
1. assigning passport. X. COM to a host with a relatively high speed is helpful for fast jump, and users cannot see the complicated jump process...
2. jump on the same host to avoid jump failure due to errors in the intermediate jump link.
I only tested it on the simulated multi-primary domain on the local machine. The results are good. no specific tests have been conducted on the INTERNET. please try it if you are free, and propose a better SSO solution...
Using the same primary domain (that is, all subdomains under the same level-1 domain name) includes multiple server sharing SESSION data implementation methods. I will not talk about it here !...