JwtBearerOptions.UseSecurityTokenValidators Property

Definition

Gets or sets whether TokenHandlers or SecurityTokenValidators will be used to validate the inbound token.

public bool UseSecurityTokenValidators { get; set; }
member this.UseSecurityTokenValidators : bool with get, set
Public Property UseSecurityTokenValidators As Boolean

Property Value

Remarks

The advantages of using TokenHandlers are:

There is an Async model.

The default token handler is a JsonWebTokenHandler which is faster than a JwtSecurityTokenHandler.

There is an ability to make use of a Last-Known-Good model for metadata that protects applications when metadata is published with errors.

SecurityTokenValidators can be used when SecurityToken needs a JwtSecurityToken. When using TokenHandlers, SecurityToken will be a JsonWebToken.

Applies to