How does one implement single-point logon for a mall and a forum system? Log on to the mall and click a button to log on to the forum system. How does one implement single-point logon for a mall and a forum system? Log on to the mall and click a button to log on to the forum system.
Reply content:
How does one implement single-point logon for a mall and a forum system? Log on to the mall and click a button to log on to the forum system.
You can check the Ucenter, which may meet your needs.
If session sharing can be set on the same server,
Ini_set ('session. cookie_domain ',' .domain.com ');
If the two systems are under the same domain name, you can write the login credential into the cookie so that the login information in the cookie can be taken over no matter which one you log on.
If it is not under a domain name, you can retrieve the login information (such as tokens) from the current system during the jump, and the second system can perform verification based on the token, in this way, the two systems need to share a login verification mechanism.
For more information about CAS, see.
It was previously considered and has not been implemented in detail. it is for reference only:
-
Unified logon
-
Each app login jump to the http://auth.abc.com/login page;
-
After the user successfully logs on, set the cookie under auth.abc.com domain (of course, you can set the server cache): auth_uid & auth_sign;
-
Auth_sign rule: md5 (auth_uid + obfuscation code );
-
Automatic logon
-
Each app needs to check the logon link, and the interceptor determines whether there is any logged-on information. if there is, verify the login information and signature; if not, jump through auth with app_name, such
(Http://auth.abc.com/verify? Redirect_url = .....)
-
Authauth_uid and auth_sign cookies are verified by auth. if the authentication fails, the logon page is displayed. if the authentication succeeds, the system jumps to redirect_url with user_id and auth_ticket.
-
Auth_ticket is generated based on user_id and auth_key (saved in app and auth). it is used for app verification.