我正在使用基于Spring-Boot和注释的Spring-Security,我想将另一个站点用作我的身份验证提供程序之一。
我在google上搜索但没有得到任何正确的示例或相关解决方案。
让我知道如何为2种不同的应用程序实现单点登录。
请指南。
谢谢。
答案 0 :(得分:1)
您可以使用Jasig CAS实现SSO,Spring Security支持它:https://docs.spring.io/spring-security/site/docs/3.0.x/reference/cas.html
答案 1 :(得分:0)
您可以在spring-boot应用程序集上使用@EnableOAuth2Sso
设置一些属性:客户端ID,客户端密钥,oauth2服务器的令牌端点等。
本教程适用于spring-boot上的angularJS客户端,但服务器端类似:https://spring.io/blog/2015/02/03/sso-with-oauth2-angular-js-and-spring-security-part-v