【发布时间】:2015-01-14 18:26:05
【问题描述】:
我的要求是使用 OAuth2 的 client_credentials grant_type 来获取 Mule 中的访问令牌。我想实现启用 OAuth 的自定义连接器。我无法使用以下配置实现它:
<XXX-auth2:config name="TestAuth" consumerKey="abc" consumerSecret="1234" doc:name="TestAuth">
<XXX-auth2:oauth-callback-config domain="localhost" localPort="8082" path="callback" remotePort="8082" async="false"/>
</XXX-auth2:config>
<flow name="testFlow1" doc:name="testFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8082" path="testoauth" doc:name="HTTP" />
<XXX-auth2:authorize config-ref="TestAuth" doc:name="TestAuth"/>
<logger message="Test Auth output:#[flowVars['tokenId']]" level="INFO" doc:name="Logger"/>
</flow>
我的要求是管理来自批处理作业的 OAuth 保护调用。请提出建议。
【问题讨论】:
-
我猜你会在消息入站属性'access_token'中获得tokenId
-
那很好,但我的流控制甚至没有到达记录器组件。没有任何类型的错误或异常。我被困在这里了。
-
你能分享你的连接器代码吗?