SecurityTokenAuthenticator.ValidateToken Method (SecurityToken)


Authenticates the specified security token and returns the set of authorization policies for the security token.

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

public ReadOnlyCollection<IAuthorizationPolicy> ValidateToken(
	SecurityToken token


Type: System.IdentityModel.Tokens.SecurityToken

The SecurityToken to be validated.

Return Value

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

A ReadOnlyCollection<T> of type IAuthorizationPolicy that contains the set of authorization policies in effect for this application.

Exception Condition

token is null.


token cannot be authenticated by this security token authenticator


token is not authenticated.

The ValidateToken method checks whether the token parameter is null, calls the CanValidateToken method to determine if this security token authenticator can authenticate this security token, and then if it can, calls the ValidateTokenCore method.

.NET Framework
Available since 3.0
Return to top