简体   繁体   English

具有basicHttpbinding和ssl的UserNamePasswordValidator

[英]UserNamePasswordValidator with basicHttpbinding and ssl

is it possible to have BasicHttpBinding with an Custom UserNamePasswordValidator and have transport security? 是否可以使用具有自定义UserNamePasswordValidator的BasicHttpBinding并具有传输安全性?

I just get InvalidSecurity from php soap and if I trace the error 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. 我只是从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.

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

i'll include the config if its necessary but I just need to know if it can be done or else I guess I have to call the validate method inside every [OperationContract] ? 我将在必要时包含配置,但我只需要知道它是否可以完成,否则我想我必须在每个[OperationContract]调用validate方法? havent tested this yet but seen others talk about it. 还没有测试,但是看到其他人在谈论它。

ok I dont know how it works but apperently I did right all along. 好的,我不知道它是如何工作的,但是我一直正确地做着。 what made it to work was that in my php code when i specify username and password that the parameters was named. 使它起作用的原因是在我的php代码中,当我指定参数的用户名和密码时。

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

and the same in my custom username password validator. 和我的自定义用户名密码验证器中的相同。 i had userName and Password before on both places and that didnt work. 我之前在两个地方都有userNamePassword ,但没有用。 So i dont know the difference but it works now... maybe someone else can answer why it works this way. 所以我不知道有什么区别,但是它现在可以工作了……也许其他人可以回答为什么这样工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM