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

html - jquery - p element wont show after I hid it -

python - BeautifulSoup: How to get the nearest tag -

php - Return Last Insert ID with PDO -