Предохранитель 2.3.0.redhat-60024 и пространства имен Spring
Я пытаюсь разработать решение с использованием предохранителя, использующего реализацию 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%5d
Я пробовал много решений, но ни одно из них не позволяет зарегистрировать класс пространства имен 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>