SessionSecurityTokenHandler Constructor (ReadOnlyCollection<CookieTransform>, TimeSpan)

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Initializes a new instance of the SessionSecurityTokenHandler class that uses the specified cookie transforms and token lifetime.

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

public SessionSecurityTokenHandler(
	ReadOnlyCollection<CookieTransform> transforms,
	TimeSpan tokenLifetime
)

Parameters

transforms
Type: System.Collections.ObjectModel.ReadOnlyCollection<CookieTransform>

The transforms to apply when encoding or decoding the cookie. Sets the Transforms property.

tokenLifetime
Type: System.TimeSpan

The default lifetime for a token. Sets the TokenLifetime property.

Exception Condition
ArgumentNullException

transforms is null.

InvalidOperationException

tokenLifetime is less than or equal to TimeSpan.Zero.

.NET Framework
Available since 4.5
Return to top
Show: