共用方式為


TokenValidationResult Class

Definition

Contains artifacts obtained when a SecurityToken is validated. A SecurityTokenHandler returns an instance that captures the results of validating a token.

public class TokenValidationResult
type TokenValidationResult = class
Public Class TokenValidationResult
Inheritance
TokenValidationResult

Constructors

TokenValidationResult()

Creates an instance of TokenValidationResult

Properties

Claims

The Dictionary<TKey,TValue> created from the validated security token.

ClaimsIdentity

The ClaimsIdentity created from the validated security token.

Exception

Gets or sets the Exception that occurred during validation.

Issuer

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

IsValid

True if the token was successfully validated, false otherwise.

PropertyBag

Gets or sets the IDictionary<TKey,TValue> 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.

SecurityToken

Gets or sets the SecurityToken that was validated.

TokenContext

Gets or sets the CallContext that contains call information.

TokenOnFailedValidation

The SecurityToken to be returned when validation fails.

TokenType

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).

Applies to