Freigeben über


SecurityTokenHandler.ValidateToken Method

Definition

Overloads

ValidateToken(String, TokenValidationParameters, SecurityToken)

This must be overridden to validate a token passed as a string using TokenValidationParameters

ValidateToken(XmlReader, TokenValidationParameters, SecurityToken)

Reads and validates a token using a xmlReader and TokenValidationParameters

ValidateToken(String, TokenValidationParameters, SecurityToken)

This must be overridden to validate a token passed as a string using TokenValidationParameters

public virtual System.Security.Claims.ClaimsPrincipal ValidateToken (string securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters, out Microsoft.IdentityModel.Tokens.SecurityToken validatedToken);
abstract member ValidateToken : string * Microsoft.IdentityModel.Tokens.TokenValidationParameters * SecurityToken -> System.Security.Claims.ClaimsPrincipal
override this.ValidateToken : string * Microsoft.IdentityModel.Tokens.TokenValidationParameters * SecurityToken -> System.Security.Claims.ClaimsPrincipal
Public Overridable Function ValidateToken (securityToken As String, validationParameters As TokenValidationParameters, ByRef validatedToken As SecurityToken) As ClaimsPrincipal

Parameters

securityToken
String

A token of type TokenType.

validationParameters
TokenValidationParameters

The TokenValidationParameters to be used for validating the token.

validatedToken
SecurityToken

The token of type TokenType that was validated.

Returns

Implements

Applies to

ValidateToken(XmlReader, TokenValidationParameters, SecurityToken)

Reads and validates a token using a xmlReader and TokenValidationParameters

public virtual System.Security.Claims.ClaimsPrincipal ValidateToken (System.Xml.XmlReader reader, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters, out Microsoft.IdentityModel.Tokens.SecurityToken validatedToken);
abstract member ValidateToken : System.Xml.XmlReader * Microsoft.IdentityModel.Tokens.TokenValidationParameters * SecurityToken -> System.Security.Claims.ClaimsPrincipal
override this.ValidateToken : System.Xml.XmlReader * Microsoft.IdentityModel.Tokens.TokenValidationParameters * SecurityToken -> System.Security.Claims.ClaimsPrincipal
Public Overridable Function ValidateToken (reader As XmlReader, validationParameters As TokenValidationParameters, ByRef validatedToken As SecurityToken) As ClaimsPrincipal

Parameters

reader
XmlReader

A XmlReader pointing at the start element of the token.

validationParameters
TokenValidationParameters

The TokenValidationParameters to be used for validating the token.

validatedToken
SecurityToken

The SecurityToken that was validated.

Returns

Applies to