WindowsUserNameSecurityTokenHandler.ValidateToken Method (SecurityToken)

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

Validates the specified token and returns its claims.

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

public override ReadOnlyCollection<ClaimsIdentity> ValidateToken(
	SecurityToken token
)

Parameters

token
Type: System.IdentityModel.Tokens.SecurityToken

The token to validate. An instance of UserNameSecurityToken.

Return Value

Type: System.Collections.ObjectModel.ReadOnlyCollection<ClaimsIdentity>

The identities that are contained in the token.

Exception Condition
ArgumentNullException

token is null.

ArgumentException

token is not assignable from UserNameSecurityToken.

-or-

The UserName property of the specified token is not of the form user\domain.

InvalidOperationException

The Configuration property is null.

SecurityTokenValidationException

LogonUser using the specified token failed.

.NET Framework
Available since 4.5
Return to top
Show: