Table of Contents

Class JwtAuthenticationOptions

Namespace
Arc4u.OAuth2.Options
Assembly
Arc4u.OAuth2.AspNetCore.Authentication.dll

The options of the JWT bearer authentication, given to AddJwtAuthentication.

public class JwtAuthenticationOptions
Inheritance
JwtAuthenticationOptions
Inherited Members

Properties

CertSecurityKey

Gets or sets an optional certificate used as issuer signing key to validate tokens.

public X509Certificate2? CertSecurityKey { get; set; }

Property Value

X509Certificate2

ClaimsIdentifierOptions

Gets or sets the action that fills the claim types identifying a user.

public Action<ClaimsIdentifierOption> ClaimsIdentifierOptions { get; set; }

Property Value

Action<ClaimsIdentifierOption>

DefaultAuthority

Gets or sets the default authority that issues the tokens. Its url is the authority and its metadata address is used to download the signing keys.

public AuthorityOptions DefaultAuthority { get; set; }

Property Value

AuthorityOptions

NameClaimType

Gets or sets the claim type holding the name of the user (User.Identity.Name). The default is name.

public string NameClaimType { get; set; }

Property Value

string

OAuth2SettingsOptions

Gets or sets the action that fills the OAuth2SettingsOption (audiences, scopes, ...). Required.

public Action<OAuth2SettingsOption> OAuth2SettingsOptions { get; set; }

Property Value

Action<OAuth2SettingsOption>

RoleClaimType

Gets or sets the claim type holding the roles of the user. The default is role.

public string RoleClaimType { get; set; }

Property Value

string

ValidateAuthority

Gets or sets a value indicating whether the issuer of the token must be validated. The default is true. When true, the issuer must be Issuer of the default authority when it is set, or the issuer read from its metadata otherwise.

public bool ValidateAuthority { get; set; }

Property Value

bool