如何检测自动登录的CAS cookie?
How to detect CAS cookie for automatic login?
我的目标与所描述的内容相交 here。如果用户已经在另一个 SP 上使用 CAS 登录,我希望我的 SP(一个 React 应用程序)能够检测到这一点并自动启动 CAS 工作流程,而无需用户单击任何 'sign in' 按钮。
正如 post 中的评论所建议的那样,我可以在文档的 cookie 中查找 CAS 会话的一些工件。然而,我所知道的仅有的两个 cookie(JSESSIONID= 和 TGC=)将它们的路径设置为 cas.example.com,使它们无法访问 mysite.example.com。
是否有任何其他可靠的方法来判断用户是否已经启动了 CAS 会话?
Are there any other surefire ways of telling whether a user has already initiated a CAS session?
如果您的 SP 使用 CAS 协议,那么更传统的方法是尝试利用 CAS protocol:
的网关功能
If this parameter is set, CAS will not ask the client for credentials. If the client has a pre-existing single sign-on session with CAS, or if a single sign-on session can be established through non-interactive means (i.e. trust authentication), CAS MAY redirect the client to the URL specified by the service parameter, appending a valid service ticket…If the client does not have a single sign-on session with CAS, and a non-interactive authentication cannot be established, CAS MUST redirect the client to the URL specified by the service parameter with no “ticket” parameter appended to the URL.
OpenID Connect 等其他协议也具有类似的功能。
这个 blog post 也可能有用。
通常,您必须修改 cookie 路径或在 CAS 中创建自定义 cookie,这两者都需要访问 CAS 服务器。 cookie-based SSO 解决方案没有其他选择,除了网关等
我的目标与所描述的内容相交 here。如果用户已经在另一个 SP 上使用 CAS 登录,我希望我的 SP(一个 React 应用程序)能够检测到这一点并自动启动 CAS 工作流程,而无需用户单击任何 'sign in' 按钮。
正如 post 中的评论所建议的那样,我可以在文档的 cookie 中查找 CAS 会话的一些工件。然而,我所知道的仅有的两个 cookie(JSESSIONID= 和 TGC=)将它们的路径设置为 cas.example.com,使它们无法访问 mysite.example.com。
是否有任何其他可靠的方法来判断用户是否已经启动了 CAS 会话?
Are there any other surefire ways of telling whether a user has already initiated a CAS session?
如果您的 SP 使用 CAS 协议,那么更传统的方法是尝试利用 CAS protocol:
的网关功能If this parameter is set, CAS will not ask the client for credentials. If the client has a pre-existing single sign-on session with CAS, or if a single sign-on session can be established through non-interactive means (i.e. trust authentication), CAS MAY redirect the client to the URL specified by the service parameter, appending a valid service ticket…If the client does not have a single sign-on session with CAS, and a non-interactive authentication cannot be established, CAS MUST redirect the client to the URL specified by the service parameter with no “ticket” parameter appended to the URL.
OpenID Connect 等其他协议也具有类似的功能。
这个 blog post 也可能有用。
通常,您必须修改 cookie 路径或在 CAS 中创建自定义 cookie,这两者都需要访问 CAS 服务器。 cookie-based SSO 解决方案没有其他选择,除了网关等