Delen via


OpenIdConnectOptions.UseSecurityTokenValidator Property

Definition

Gets or sets whether to use the TokenHandler or the SecurityTokenValidator for validating identity tokens.

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

Property Value

Remarks

The advantages of using TokenHandler 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.

SecurityTokenValidator can be used when SecurityToken needs a JwtSecurityToken. When using TokenHandler, SecurityToken will be a JsonWebToken.

Applies to