Validators.ValidateTokenType Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Validates the type of the token.
public static string ValidateTokenType (string type, Microsoft.IdentityModel.Tokens.SecurityToken securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
static member ValidateTokenType : string * Microsoft.IdentityModel.Tokens.SecurityToken * Microsoft.IdentityModel.Tokens.TokenValidationParameters -> string
Public Shared Function ValidateTokenType (type As String, securityToken As SecurityToken, validationParameters As TokenValidationParameters) As String
Parameters
- type
- String
The token type or null
if it couldn't be resolved (e.g from the 'typ' header for a JWT).
- securityToken
- SecurityToken
The SecurityToken that is being validated.
- validationParameters
- TokenValidationParameters
TokenValidationParameters required for validation.
Returns
The actual token type, that may be the same as type
or a different value if the token type was resolved from a different location.
Exceptions
If securityToken
is null.
If type
failed to match ValidTypes.
Remarks
An EXACT match is required. Ordinal (case sensitive) is used for comparing type
against ValidTypes.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für