Retrieving SOAP Password

I am developing web services in C # using WCF and I want to create my own way to handle security. I found a way to extract the username from the soap message that was sent to the web service:

String username = System.ServiceModel.ServiceSecurityContext.Current.PrimaryIdentity.Name;

      

I was wondering if there was a similar way to get the password from a SOAP post?

thank

+1


source to share


1 answer


Depending on which bits of WS-Security are used, the password may not appear in the message. It could be a hash of the password or something like a kerberos token.



Unless the message is sent over a secure channel like SSH, you don't want the message to include a password.

0


source







All Articles