Re: UsernameTokenManager.AuthenticateUser
- From: "Pablo Cibraro" <pcibraro@xxxxxxxxxxx>
- Date: Tue, 10 Jan 2006 10:28:01 -0300
Hi Phil,
That happens because you are using secure session.
When you enable this feature, WSE only authenticates the client the first
time and then it creates a SecureContextToken that contains in some way the
UsernameToken.
This feature improves the performance for successive calls since the
authentication and the key interchange is done once.
You have two ways to clear the cache but you shouldn't be worried about it:
1. Create a new instance of the proxy class and assign the UsernameToken as
client token. The SecureContextToken is only valid per proxy class.
2. Cancel the SecureContextToken:
SecureConversationCorrelationState correlationState =
serviceProxy.ResponseSoapContext.SessionState.Get<SecureConversationCorrelationState>("");
SecurityContextToken sct = correlationState.Token as SecurityContextToken;
sct.Cancel();
Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax
http://www.lagash.com
"Phil Lee" <phil.lee@xxxxxxxxxxxxxxxxx> wrote in message
news:OKW6p$TFGHA.3384@xxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> when I implement UsernameTokerManager.AuthenticateUser it never seems to
> be called again after successfully authenticating a client.
>
> I'm currently using username over certificate with secure session. I can
> see that there's a 'ttlInSeconds=300' in the policy cache but changing
> this to a small value has no effect.
> Also calling SetClientCredential from the client with a new UsernameToken
> (different username/password) doesn't cause a re-authentication. Even
> creating a new proxy in the client doesn't seem to cause a
> re-authentication. Only restarting the client app causes a new
> authentication.
>
> I assume this is by design and that the authentication is being cached.
> Is there a way to clear the cache? And should I be worried anyway?
>
> Regards
> Phil Lee
>
.
- Follow-Ups:
- Re: UsernameTokenManager.AuthenticateUser
- From: Phil Lee
- Re: UsernameTokenManager.AuthenticateUser
- References:
- UsernameTokenManager.AuthenticateUser
- From: Phil Lee
- UsernameTokenManager.AuthenticateUser
- Prev by Date: Re: UsernameTokenManager.AuthenticateUser
- Next by Date: Re: Can I use WSE with C++? Do I need WSE?
- Previous by thread: Re: UsernameTokenManager.AuthenticateUser
- Next by thread: Re: UsernameTokenManager.AuthenticateUser
- Index(es):
Relevant Pages
|