【发布时间】:2016-02-08 05:27:50
【问题描述】:
您好,我是 Spring Security 的新手,OAUTH2 可以帮助任何人......我正在使用此示例中提供的示例 http://www.beingjavaguys.com/2014/10/spring-security-oauth2-integration.html
我要做的是创建 2 个 Web 应用程序,其中一个应用程序(mainApp)存储所有受保护的资源并且不了解用户,它需要对另一个应用程序进行休息调用以获取详细信息
目前在我的安全配置中
<authentication-manager id="clientAuthenticationManager"
xmlns="http://www.springframework.org/schema/security">
<authentication-provider user-service-ref="clientDetailsUserService" />
</authentication-manager>
<authentication-manager alias="authenticationManager"
xmlns="http://www.springframework.org/schema/security">
<authentication-provider>
<user-service>
<user name="abcd" password="1234" authorities="ROLE_APP" />
</user-service>
</authentication-provider>
</authentication-manager>
在我的例子中,我想让我们在另一个应用程序中的自定义 API 进行身份验证,然后返回一个包含角色和其他属性的自定义 UserDetails 对象
【问题讨论】:
-
有什么问题?请尽可能明确地告诉我们您遇到了什么问题,包括您可能收到的任何错误消息。
标签: spring security spring-mvc spring-security oauth-2.0