Php single sign-on

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.