SecurityTokenProvider.GetTokenCore timeout

Damir Dobric Posts

Next talks:



Follow me on Twitter: #ddobric




WCF open architecture provides a mechanism to implement the custom SecurityTokenProvider and custom SecurityToken.  While implementing the custom security provider
there is a method GetTokenCore which responsible to obtain the custom token.

protected override System.IdentityModel.Tokens.SecurityToken GetTokenCore(TimeSpan timeout)

As you see this method receives a timeout parameter, which defines how much time you have to create the token. This value is by default set on 1 minute. This might be enough, but imagine you need the user interaction to create the token. Similar problem has a card space token provider which pops up the well known Card-Space GUI. In this case user could need more than one minute to do whatever it should be done. For this reason the timeout of 1 minute could be a bit too short.

This value corresponds to the binding's sendTimeout property of the binding which is used by the proxy instance. Because the token has to be provided on invoking of the very first operation of the
proxy, this value equals sendTimeout property as shown at the next picture.



Posted Jul 07 2008, 03:18 PM by Damir Dobric is a .Net Community Blog powered by daenet GmbH.