【发布时间】:2017-09-05 07:00:37
【问题描述】:
我是用spring boot、Spring OAuth2搭建SSO服务器的。在单机模式下,令牌存储在内存中,运行良好。但现在,我想在多台服务器上运行 SSO 服务器。我用 JDBC 更改了存储策略,然后在端口 9999 和 9998 上运行了两个实例。 我不知道如何配置 application.yml 文件的客户端和资源服务器。我在客户端服务器上尝试了以下配置:
security:
basic:
enabled: false
oauth2:
client:
client-id: mud
client-secret: mud
access-token-uri: http://localhost:9999/oauth/token,http://localhost:9998/oauth/token
user-authorization-uri: http://localhost:9999/oauth/authorize,http://localhost:9998/oauth/authorize
scope: read, write
resource:
token-info-uri: http://localhost:9999/oauth/check_token,http://localhost:9998/oauth/check_token
它不起作用...当我访问资源时,SSO 服务器重定向到“http://localhost:9999/oauth/token,http://localhost:9998/oauth/token”。
spring如何配置多个SSO认证服务器?
【问题讨论】:
标签: spring oauth-2.0 single-sign-on