<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.22.0" />

Microsoft.IdentityModel.Tokens.Experimental.IResultBasedValidation

public interface IResultBasedValidation
Experimental interface that provides result based token validation instead of throwing exceptions.

Validates a token. On a validation failure, no exception will be thrown; instead, the ValidationError will contain the information about the error that occurred. Callers should always check the ValidationResult.IsValid property to verify the validity of the result.

Task<ValidationResult<ValidatedToken, ValidationError>> ValidateTokenAsync(string token, ValidationParameters validationParameters, CallContext callContext, CancellationToken cancellationToken)

Validates a token. On a validation failure, no exception will be thrown; instead, the ValidationError will contain the information about the error that occurred. Callers should always check the ValidationResult.IsValid property to verify the validity of the result.

Validates a token. On a validation failure, no exception will be thrown; instead, the ValidationError will contain the information about the error that occurred. Callers should always check the ValidationResult.IsValid property to verify the validity of the result.

Validates a token. On a validation failure, no exception will be thrown; instead, the ValidationError will contain the information about the error that occurred. Callers should always check the ValidationResult.IsValid property to verify the validity of the result.