簡體   English   中英

如何通過“ Web服務憑據”傳遞到Web服務端點?

[英]How can I pass through the 'webservice credentials' to my webservice endpoint?

我有一個PayloadRootQNameEndpointMapping ,帶有Wss4jSecurityInterceptor和一個自定義的CallbackHandler來為我做身份驗證。 現在的要求是將Web服務憑據或至少UsernameToken傳遞給Web服務以處理特定的用例。

我該如何實現? 是否可以將某些內容推送到MessageContext並稍后從那里獲取? 或者我可以從SoapMessage檢索它們對我有什么提示嗎?

謝謝。

我使用了UserPasswordAuthenticationToken並在身份驗證的#setDetails(Object details)上設置了用戶詳細#setDetails(Object details) 然后可以通過設置身份驗證

SecurityContextHolder.getContext().setAuthentication(authentication);

稍后,可以從通常使用本地線程實現的SecurityContextHolder檢索到此信息。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM