c# - Can client credentials be read from within service implementation? -


i hosting soap webservice via instance ihost of servicehost; authentication configured as

httpbinding.security.transport.clientcredentialtype = httpclientcredentialtype.basic; ihost.credentials.usernameauthentication.usernamepasswordvalidationmode      = usernamepasswordvalidationmode.custom; ihost.credentials.usernameauthentication.customusernamepasswordvalidator     = new customvalidator(); 

the hosting works desired, access client credentials within hosted service itself. can achieved current authentication settings or impossible?

found answer of coworker. username can accessed via operationcontext.current.servicesecuritycontext.primaryidentity.name; question can seen duplicate of this question.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -