Home  >  Q&A  >  body text

python - 如何实现跨域单点登陆?

问题描述

某网站A的用户登录之后,点击我的网站B的链接,也能登录状态。
相当于网站A的账号在我的网站B的也能用,登陆状态也同步

脑子现在一团浆糊,不知道有没有描述清楚

望大神提供一下思路。
网上查了一下,大概有两种方法

  1. 开发认证服务器

  2. 跨域cookie

都看的云里雾里
不知道什么方法比较简单易用


问了问大神,说可以设置秘钥,用户点击网站B的时候把秘钥和用户ID加密当做参数传递

黄舟黄舟2718 days ago695

reply all(5)I'll reply

  • 高洛峰

    高洛峰2017-04-17 17:37:56

    One end successfully logs in and calls the session generation interface of other systems;

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 17:37:56

    This seems to be oAuth2. If you call it directly to generate a session, you probably need to do a redirect to set the cookie

    reply
    0
  • 迷茫

    迷茫2017-04-17 17:37:56

    The simplest single sign-on is to use cookies, although it is not secure.

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 17:37:56

    Two websites with the same main domain name can use cookies to achieve single sign-in. If they have different domain names, they need to share an authentication server.

    reply
    0
  • 黄舟

    黄舟2017-04-17 17:37:56

    CAS can’t meet your needs? ?

    reply
    0
  • Cancelreply