哪位大神搞过cxf oauth2.0

hongger 2014-10-10 02:51:45
最近在学习 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
...全文
168 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

24,922

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧