2013-01-03 41 views
1

基本上它是我剛纔的問題的延伸How to read REST service that returns JSON object and store the same into PostgreSQL using Mule ESB, Mule Studio如何使用Mule配置身份驗證?

我有一些REST服務處於運行「http://localhost:35798/RestServiceImpl.svc/json/567

現在,爲了訪問這些服務,我需要驗證作爲admin.The憑據

用戶名:管理員

密碼: PWD

流(exisiting)應該能夠處理認證&通過REST建立會話。

如何使用Mule進行身份驗證?如果認證失敗,流程將停止。成功認證後,它將讀取REST服務並將數據插入到PostgreSQL中。

請幫

+0

難道你閱讀[文檔](http://www.mulesoft.org/documentation/display/MULE3USER/Configuring+Security)? –

+0

此鏈接用於配置入站安全性:我有OP正在尋找出站的印象(雖然不是100%確定)。 –

回答

2

把憑證在出站端點URI:

http://admin:[email protected]:35798/RestServiceImpl.svc/json/567 

當然你也可以使用特性,以避免硬編碼他們在騾子的配置:

http://${rest.admin.username}:${rest.admin.password}@localhost:35798/RestServiceImpl.svc/json/567 
+0

你是不是故意在「http:rest-service-component」中說出我應該放的?(http://stackoverflow.com/questions/14003046/how-to-read-rest-service-that-returns-json-object -and-store-the-same-into-postgr/14024632#comment19412046_14024632) –

+0

可以在服務URL中使用它。 –

相關問題