次の方法で共有


JsonWebTokenHandler.ValidateToken(String, TokenValidationParameters) Method

Definition

Caution

JsonWebTokens.ValidateToken(string, TokenValidationParameters) has been deprecated and will be removed in a future release. Use JsonWebTokens.ValidateTokenAsync(string, TokenValidationParameters) instead. For more information, see https://aka.ms/IdentityModel/7-breaking-changes

Validates a JWS or a JWE.

[System.Obsolete("`JsonWebTokens.ValidateToken(string, TokenValidationParameters)` has been deprecated and will be removed in a future release. Use `JsonWebTokens.ValidateTokenAsync(string, TokenValidationParameters)` instead. For more information, see https://aka.ms/IdentityModel/7-breaking-changes", false)]
public virtual Microsoft.IdentityModel.Tokens.TokenValidationResult ValidateToken (string token, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
[<System.Obsolete("`JsonWebTokens.ValidateToken(string, TokenValidationParameters)` has been deprecated and will be removed in a future release. Use `JsonWebTokens.ValidateTokenAsync(string, TokenValidationParameters)` instead. For more information, see https://aka.ms/IdentityModel/7-breaking-changes", false)>]
abstract member ValidateToken : string * Microsoft.IdentityModel.Tokens.TokenValidationParameters -> Microsoft.IdentityModel.Tokens.TokenValidationResult
override this.ValidateToken : string * Microsoft.IdentityModel.Tokens.TokenValidationParameters -> Microsoft.IdentityModel.Tokens.TokenValidationResult
Public Overridable Function ValidateToken (token As String, validationParameters As TokenValidationParameters) As TokenValidationResult

Parameters

token
String

A JSON Web Token (JWT) in JWS or JWE Compact Serialization format.

validationParameters
TokenValidationParameters

The TokenValidationParameters to be used for validating the token.

Returns

A TokenValidationResult.

Attributes

Applies to