我從http://spring-security-oauth.codehaus.org/tutorial.html下載示例項目,並試圖實現我的trialsite春季安全的OAuth實現
下面是我派出XML
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/oauth/authorization">oauthController</prop>
</props>
</property>
<property name="alwaysUseFullPath" value="true"/>
</bean>
<bean id="oauthController" class="mypackage.OauthController">
<property name="clientDetailsService" ref="clientDetails"/>
</bean>
下面是應用程序上下文
<security:http auto-config='true' access-denied-page="/index.jsp">
<security:intercept-url pattern="/oauth/**" access="ROLE_USER" />
<security:intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<security:form-login authentication-failure-url="/index.jsp" default-target-url="/index.jsp" login-page="/index.jsp" />
<security:logout logout-success-url="/index.jsp" />
</security:http>
<bean id="tokenServices" class="org.springframework.security.oauth2.provider.token.InMemoryOAuth2ProviderTokenServices">
<property name="supportRefreshToken" value="true"/>
</bean>
<oauth:provider client-details-service-ref="clientDetails" token-services-ref="tokenServices" >
<oauth:verification-code user-approval-page="/oauth/authorization"/>
</oauth:provider>
<oauth:client-details-service id="clientDetails">
<oauth:client clientId="client1" authorizedGrantTypes="authorization_code"/>
</oauth:client-details-service>
發送後來自客戶的要求
我得到404錯誤(找不到資源),可能是什麼問題?