views:

56

answers:

1

I have been tasked with implementing user switching in a component that connects to a WCF service using federated security.

I can use Tokenclaims.ReadClaim() to find out what username is currently logged on.

How do I invalidate this token and force another logon?

I have tried changing the username and password on the credentials, but that doesn't seem to do the trick, as the existing claim is still being used.

help :)

A: 

I suggest looking into writing a custom ClientCredentials subclass. In this class you can manage what tokens are used and when for each call. You can read more about custom client credentials in this MSDN article.

Drew Marsh