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

Microsoft.IdentityModel.Tokens.TokenValidationResult

public class TokenValidationResult
Contains artifacts obtained when a SecurityToken is validated. A SecurityTokenHandler returns an instance that captures the results of validating a token.
public IDictionary<string, object> Claims { get; }

The Dictionary<T, U> created from the validated security token.

public ClaimsIdentity ClaimsIdentity { get; set; }

The ClaimsIdentity created from the validated security token.

public Exception Exception { get; set; }

Gets or sets the Exception that occurred during validation.

public string Issuer { get; set; }

Gets or sets the issuer that was found in the token.

public bool IsValid { get; set; }

True if the token was successfully validated, false otherwise.

public IDictionary<string, object> PropertyBag { get; }

Gets or sets the IDictionary<T, U> that contains a collection of custom key/value pairs. This allows addition of data that could be used in custom scenarios. This uses Ordinal for case-sensitive comparison of keys.

public SecurityToken SecurityToken { get; set; }

Gets or sets the SecurityToken that was validated.

public CallContext TokenContext { get; set; }

Gets or sets the CallContext that contains call information.

The SecurityToken to be returned when validation fails.

public string TokenType { get; set; }

Gets or sets the token type of the SecurityToken that was validated. When a TypeValidator is registered, the type returned by the delegate is used to populate this property. Otherwise, the type is resolved from the token itself, if available (e.g for a JSON Web Token, from the "typ" header).

Creates an instance of TokenValidationResult