Język

JsonWebTokenHandler.ValidateToken(String, TokenValidationParameters) Metoda

Definicja

Uwaga

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

Weryfikuje zestaw JWS lub 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

Parametry

token
String

Token internetowy JSON (JWT) w formacie serializacji JWS lub JWE Compact.

validationParameters
TokenValidationParameters

Element TokenValidationParameters , który ma być używany do sprawdzania poprawności tokenu.

Zwraca

Element TokenValidationResult.

Atrybuty

Dotyczy