【发布时间】:2017-01-04 10:01:45
【问题描述】:
我们尝试使用以下配置在 Spring 中实现 Oauth2:
<sec:http pattern="/oauth/token" create-session="stateless"
authentication-manager-ref="authenticationManager">
<sec:intercept-url pattern="/oauth/token" access="IS_AUTHENTICATED_FULLY"
method="GET" />
<sec:anonymous enabled="false" />
<sec:http-basic entry-point-ref="clientAuthenticationEntryPoint" />
<sec:custom-filter ref="clientCredentialsTokenEndpointFilter"
before="BASIC_AUTH_FILTER" />
<sec:access-denied-handler ref="oauthAccessDeniedHandler" />
</sec:http>
但是当我们从另一个域调用/oauth/token 时,我们得到了 403 错误。
/oauth/token如何配置CORS?
【问题讨论】:
标签: java spring spring-security oauth