Export (0) Print
Expand All

WSFederationAuthenticationModule.GetSessionTokenContext Method

.NET Framework 4.5

Gets a string that should be persisted with the session cookie in the SessionSecurityToken.Context property.

Namespace:  System.IdentityModel.Services
Assembly:  System.IdentityModel.Services (in System.IdentityModel.Services.dll)

protected virtual string GetSessionTokenContext()

Return Value

Type: System.String
The string to persist in the session cookie.

ExceptionCondition
ArgumentNullException

The Issuer property is null.

The GetSessionTokenContext method is called from the request processing pipeline when processing a WS-Federation sign-in response message to get the value to store in the SessionSecurityToken.Context property inside the session cookie.

You can override this method to provide an application-specific value to be stored in the cookie. WSFAM does not expose any methods to retrieve the value from the cookie. You must provide the logic in your application to read the value back from the cookie if it is needed.

.NET Framework

Supported in: 4.6, 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft