哪位大神搞过cxf oauth2.0
最近在学习 cxf oauth 2.0, 搭建一个oauth server, 采用最基本的客户端验证, 可总是成功不了,提示我405的错误,请各路神仙帮忙看看,cxf的代码配置如下:
<bean id="clientCredentialHandler" class="org.apache.cxf.rs.security.oauth2.grants.clientcred.ClientCredentialsGrantHandler"/>
<bean id="accessTokenService"
class="org.apache.cxf.rs.security.oauth2.services.AccessTokenService">
<property name="grantHandlers">
<list>
<ref bean="clientCredentialHandler"/>
</list>
</property>
</bean>
<jaxrs:server id="oauthServer" address="/oauth">
<jaxrs:serviceBeans>
<ref bean="accessTokenService" />
</jaxrs:serviceBeans>
</jaxrs:server>
浏览器访问:http://localhost:8083/oauth/token?grant_type=client_credentials