I have been tasked with implementing user switching in a component that connects to a WCF service using federated security.
I can use Tokencla开发者_如何学Pythonims.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 :)
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.
精彩评论