Spring Security OAuth2 サンプルでこれが定義されているのを見たことがありますspring-servlet.xml
。
<http pattern="/users/**" 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="/photos" access="ROLE_USER,SCOPE_READ" />
<intercept-url pattern="/photos/trusted/**" access="ROLE_CLIENT,SCOPE_TRUST" />
<intercept-url pattern="/photos/user/**" access="ROLE_USER,SCOPE_TRUST" />
<intercept-url pattern="/photos/**" access="ROLE_USER,SCOPE_READ" />
<custom-filter ref="resourceServerFilter" before="PRE_AUTH_FILTER" />
<access-denied-handler ref="oauthAccessDeniedHandler" />
</http>
タグのpattern
属性は有効ですか? http
でその定義を見つけることができませんでしたspring-security-2.0.1.xsd
。有効な場合、このパターンとintercept-url
のpattern
属性との関係は? たとえば、インターセプト パス/photos/user/**
の最終一致インターセプト パスは/users/photos/user/**
ですか? ありがとう。