SessionSecurityTokenHandler.ValidateSession Method (SessionSecurityToken)

.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.

Determines whether the session associated with the specified token is still valid. Validity is determined by checking the ValidFrom and ValidTo properties of the specified token. An exception is thrown if the session is no longer valid.

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

protected virtual void ValidateSession(
	SessionSecurityToken securityToken
)

Parameters

securityToken
Type: System.IdentityModel.Tokens.SessionSecurityToken

The token to be checked.

Exception Condition
ArgumentNullException

securityToken is null.

InvalidOperationException

The Configuration property is null.

SecurityTokenNotYetValidException

The ValidFrom property of the token is later than UtcNow.

SecurityTokenExpiredException

The ValidTo property of the token is earlier than UtcNow.

The token is not valid if its ValidFrom property is set to a value that occurs later than UtcNow, or if its ValidTo property is set to a value that occurs earlier than UtcNow.

Called from the ValidateToken methods to validate the session.

.NET Framework
Available since 4.5
Return to top
Show: