Re: UsernameTokenManager.AuthenticateUser
- From: "Phil Lee" <phil.lee@xxxxxxxxxxxxxxxxx>
- Date: Tue, 10 Jan 2006 13:23:04 -0000
Luke,
I have managed to sort out my problems - partially a bug on my part, but
this is what my understanding is now:
Using WSE3 username over certificate and implementing:
class MyUsernameTokenManager : UsernameTokenManager
{
string AuthenticateToken(...) {}
}
If <usernameForCertificateSecurity establishSecurityContext="false" .. />
then AuthenticateToken is called for every web service method call.
The client only has to do
proxy.SetClientCredential( new UsernameToken( "new name", "new
password" ) );
to change the user credentials.
If however <usernameForCertificateSecurity establishSecurityContext="true"
.../>
then AuthenticateToken is only called once.
This is fair enough because a security context is established and cached (I
think).
However now the client has to invalidate the security context somehow. This
works
proxy.SetPolicy("ClientPolicy");
proxy.SetClientCredential( new UsernameToken( "new name", "new
password" ) );
or this
proxy = new Proxy();
proxy.SetPolicy("ClientPolicy");
proxy.SetClientCredential( new UsernameToken( "new name", "new
password" ) );
I would have expected SetClientCredential to have been sufficient.
Regards
Phil Lee
"Luke Zhang [MSFT]" <lukezhan@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:GEifg9cFGHA.1236@xxxxxxxxxxxxxxxxxxxxxxxx
> Hello,
>
> Did you say UsernameTokenManager.AuthenticateToken Method in WSE 3.0?
>
> Luke
.
- References:
- UsernameTokenManager.AuthenticateUser
- From: Phil Lee
- RE: UsernameTokenManager.AuthenticateUser
- From: Luke Zhang [MSFT]
- UsernameTokenManager.AuthenticateUser
- Prev by Date: RE: UsernameTokenManager.AuthenticateUser
- Next by Date: Re: UsernameTokenManager.AuthenticateUser
- Previous by thread: RE: UsernameTokenManager.AuthenticateUser
- Next by thread: Re: UsernameTokenManager.AuthenticateUser
- Index(es):
Relevant Pages
|