【发布时间】:2017-11-08 00:57:03
【问题描述】:
我最近升级到 Spring SEcurity 4.2.2.RELEASE,现在我的 OAuth2 配置出现问题(使用 v 2.0.7.RELEASE)。我想强制看起来像“/context-path/api/**”的 URL 需要 OAuth 访问令牌。所以我有
<http pattern="/api/**"
create-session="never"
entry-point-ref="oauthAuthenticationEntryPoint"
access-decision-manager-ref="accessDecisionManager"
xmlns="http://www.springframework.org/schema/security">
<anonymous enabled="false" />
<intercept-url pattern="/**"
access="IS_AUTHENTICATED_FULLY"/>
<custom-filter ref="resourceServerFilter"
before="PRE_AUTH_FILTER" />
<access-denied-handler ref="oauthAccessDeniedHandler" />
但是,升级到 Spring SEcurity 4 后,我收到了这个错误...
Caused by: java.lang.IllegalArgumentException: Unsupported configuration attributes: [IS_AUTHENTICATED_FULLY]
表明用户必须完全通过身份验证才能访问我的资源的正确方法是什么?
【问题讨论】:
标签: spring spring-security oauth-2.0 spring-oauth2