CXF OAuth2 Resource Owner Password Credentials 实现

CXF OAuth2 Authorization Code方式的我已经实现
Resource Owner Password Credentials这种方式的没能搞定
请问有现成的例子么,需要参考一下

如下的配置会报错

 <!-- resource owner grant handler -->
    <bean id="loginHandler" class="org.apache.cxf.rs.security.oauth2.grants.owner.JAASResourceOwnerLoginHandler"/>
    <bean id="resourceOwnerGrantHandler"
          class="org.apache.cxf.rs.security.oauth2.grants.owner.ResourceOwnerGrantHandler">
        <property name="loginHandler" ref="loginHandler"/>
        <property name="dataProvider" ref="dataProvider"/>
    </bean>

        <!-- 生成access token -->
    <bean id="accessTokenService" class="org.apache.cxf.rs.security.oauth2.services.AccessTokenService">
        <property name="dataProvider" ref="dataProvider"/>
        <property name="grantHandlers">
            <list value-type="java.util.ArrayList">
                <ref bean="refreshTokenGrantHandler"/>
                <ref bean="resourceOwnerGrantHandler"/>
            </list>
        </property>
    </bean>

楼主能把实现的代码发给我吗?我现在用到 CXF + OAuth2 集成这块了,但是没什么思路;

自己写个类, 实现org.apache.cxf.rs.security.oauth2.grants.owner.ResourceOwnerLoginHandler接口作为loginHandler即可.

apache cxf 实现该接口的类是org.apache.cxf.rs.security.oauth2.grants.owner.JAASResourceOwnerLoginHandler , 这个实现太繁杂了, 看不懂就算了.