This documentation is archived and is not being maintained.
SecurityTokenAuthenticator::ValidateToken Method
Visual Studio 2010
Authenticates the specified security token and returns the set of authorization policies for the security token.
Assembly: System.IdentityModel (in System.IdentityModel.dll)
Parameters
- 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 |
|---|---|
| ArgumentNullException | token is nullptr. |
| SecurityTokenValidationException | token cannot be authenticated by this security token authenticator -or- token is not authenticated. |
The ValidateToken method checks whether the token parameter is nullptr, 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.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: