sur*_*a2k 27 spring-mvc spring-security spring-4 spring-oauth2
我正在尝试将Spring OAuth2集成到Spring MVC REST中.大多数Spring OAuth2示例中只有ResourceServerConfigurerAdapter
一些也有一些WebSecurityConfigurerAdapter
.我不打算将OAuth与Google,Facebook等集成.我正在尝试为Spring MVC REST提供基于令牌的身份验证,该Basic
身份验证目前基于身份验证.有人可以在单个服务器中了解Spring MVC REST + OAuth集成需要什么,而不是或者很好的资源吗?
目前我的POC没有WebSecurityConfigurerAdapter
,但与之ResourceServerConfigurerAdapter
一起工作AuthorizationServerConfigurerAdapter
.看起来ResourceServerConfigurerAdapter
就够了.现在我不知道我应该怎样对我现有的WebSecurityConfigurerAdapter
,在我的Spring MVC REST应用程序中完美运行.
Flo*_*ial 17
这是一个很好的答案/sf/answers/2002298231/,看起来WebSecurityConfigurerAdapter的命令不如ResourceServerConfigurerAdapter.
我有一个WebSecurityConfigurerAdapter和一个ResourceServerConfigurerAdapter,但端点安全配置位于ResourceServerConfigurerAdapter下:
public void configure(HttpSecurity http) throws Exception {
Run Code Online (Sandbox Code Playgroud)
我也有以下配置:
security:
oauth2:
resource:
filter-order: 3
Run Code Online (Sandbox Code Playgroud)
否则端点安全配置将被忽略(我不知道为什么).
归档时间: |
|
查看次数: |
16023 次 |
最近记录: |