簡體   English   中英

具有basicHttpbinding和ssl的UserNamePasswordValidator

[英]UserNamePasswordValidator with basicHttpbinding and ssl

是否可以使用具有自定義UserNamePasswordValidator的BasicHttpBinding並具有傳輸安全性?

我只是從php soap獲取InvalidSecurity,如果我跟蹤錯誤, Security processor was unable to find a security header in the message. This might be because the message is an unsecured fault or because there is a binding mismatch between the communicating parties. This can occur if the service is configured for security and the client is not using security. Security processor was unable to find a security header in the message. This might be because the message is an unsecured fault or because there is a binding mismatch between the communicating parties. This can occur if the service is configured for security and the client is not using security.

目前,我正在使用basicHttpBinding和TransportWithMessageCredential以及clientCredentialType="UserName" />

我將在必要時包含配置,但我只需要知道它是否可以完成,否則我想我必須在每個[OperationContract]調用validate方法? 還沒有測試,但是看到其他人在談論它。

好的,我不知道它是如何工作的,但是我一直正確地做着。 使它起作用的原因是在我的php代碼中,當我指定參數的用戶名和密碼時。

$soapClient = new SoapClient("https://wsdl"), array('login' => "user123", 
                                                    'password' => "pass123"));

和我的自定義用戶名密碼驗證器中的相同。 我之前在兩個地方都有userNamePassword ,但沒有用。 所以我不知道有什么區別,但是它現在可以工作了……也許其他人可以回答為什么這樣工作。

暫無
暫無

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

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