0

Fuse 2.3.0.redhat-60024 と Spring 名前空間

oauth1 (mvn:org.springframework.security.oauth/spring-security-oauth/1.0.5.RELEASE) の Spring 実装を使用するヒューズを使用してソリューションを開発しようとしています。この春のバンドルは、私が見つけた中で最高のクライアント側のサポートを持っているようで、すでに春 (Tomcat で実行) に実装していますが、Fuse には実装していません。

Spring バンドルの名前空間とスキーマの場所は次のとおりです 。 http://www.springframework.org/schema/security/oauth http://www.springframework.org/schema/security/spring-security-oauth-1.0.xsd

しかし、この名前空間を blueprint.xml ファイルで使用してバンドルをインストールすると、バンドルが開始されません。コンソールに「GracePeriod」が表示されます。ログには、次の情報が表示されます。

17:23:44,490 | 情報 | NAPSHOT-スレッド-1 | BlueprintContainerImpl | 14 - org.apache.aries.blueprint.core - 1.0.1.redhat-60024 | バンドル com.transverse.tract.connect.tc-core-auth-oauth は名前空間ハンドラーを待機しています [ http://www.springframework.org/schema/security/oauth]

多くの解決策を試しましたが、oauth 名前空間クラスを OSGi サービスに登録またはリンクできるものはなく、常にこのメッセージが表示されます。

いくつかの指針を教えてください。以下の設計図ファイルを含めました。他に何か必要な場合はお知らせください。

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
    xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0"
    xmlns:oauth1="http://www.springframework.org/schema/security/oauth"
    xsi:schemaLocation="
        http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
        http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
        http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0 http://aries.apache.org/schemas/blueprint-ext/blueprint-ext-1.1.xsd
        http://www.springframework.org/schema/security/oauth http://www.springframework.org/schema/security/spring-security-oauth-1.0.xsd">
    <ext:property-placeholder placeholder-prefix="${[" placeholder-suffix="]}"/>

    <!--  
    <mvc:default-servlet-handler/>

    <sec:debug/>
    <sec:http auto-config="true" security="none" pattern="/**"/>

    <ctx:spring-configured/>
    <ctx:annotation-config/>
    -->
    <bean id="protectedResourceDetailsService" class="org.springframework.security.oauth.consumer.InMemoryProtectedResourceDetailsService"/>
    <bean id="oauthConsumer" class="org.springframework.security.oauth.consumer.client.CoreOAuthConsumerSupport"/>

    <oauth1:consumer resource-details-service-ref="tcOAuth10aResourceDetails" support-ref="oauthConsumer">
        <oauth1:url pattern="cxf/oauth/request_token" resources="oauthProvider" httpMethod="GET"/>
        <oauth1:url pattern="cxf/oauth/access_token" resources="oauthProvider" httpMethod="GET"/>
    </oauth1:consumer>


    <oauth1:consumer-details-service id="tcOAuth10aConsumerDetails">
        <oauth1:consumer name="oauthConsumerDetails"
                        resourceName="oauthProvider"
                        key="..."
                        secret="..."
                        requiredToObtainAuthenticatedToken="true"
                        typeOfSecret="shared"
                        resourceDescription="OAuth"/>
    </oauth1:consumer-details-service>
    <oauth1:resource-details-service id="tcOAuth10aResourceDetails">
        <oauth1:resource id="quickbooksOnlineProvider"
                        key="..."
                        secret="..."
                        user-authorization-callback-param="oauth_callback"
                        user-authorization-token-param="requestToken"
                        request-token-url="https://oauth.intuit.com/oauth/v1/get_request_token"
                        user-authorization-url="https://appcenter.intuit.com/Connect/Begin"
                        access-token-url="https://oauth.intuit.com/oauth/v1/get_access_token"
                        signature-method="HMAC-SHA1"
                        accepts-authorization-header="true"
                        use10a="true"
                        access-token-method="POST"
                        request-token-method="POST"/>
    </oauth1:resource-details-service>
</blueprint>
4

1 に答える 1

0

FUSEでOAuthを使用したことがないので、それについてはよくわかりません。しかし、FUSE インストールに Spring OAuth OSGI 機能がインストールされていないようです。Spring OAuth ライブラリが OSGI 対応かどうか、Spring OAuth OSGI 機能が存在するかどうかを確認しましたか? そのような機能がある場合はfeatures:list | grep oauth、FUSE インストールに正しくインストールされているかどうかを確認できます。

Spring OAuth ライブラリが OSGI 化されていない場合は、CXF-RS 実装を使用できます。これを行う方法については、こちらを参照してください。

于 2014-06-27T07:54:57.033 に答える