DapperMaticJwtOptions
Namespace: MJCZone.DapperMatic.AspNetCore.Accounts
Assembly: MJCZone.DapperMatic.AspNetCore
Summary
The built-in accounts' access tokens as JSON Web Tokens, which other services check with the keys DapperMatic publishes (<c>auth/jwks.json</c>). Signed with RS256 (an RSA key of 2,048 bits or more) or ES256 (a P-256 key) only.
sealed public
Contents
Constructors (1) | Methods (5) | Properties (4)
Constructors
DapperMaticJwtOptions
DapperMaticJwtOptions()Methods
AddKey
Adds a signing key.
DapperMaticJwtOptions AddKey(string keyId, string pem)Parameters
- keyId (string) - ).
- pem (string) - The key in PEM: an RSA key of 2,048 bits or more, or a P-256 EC key; private for the first.
Returns
Type: DapperMaticJwtOptions
These options.
GetType
GetType()ToString
ToString()Equals
Equals()GetHashCode
GetHashCode()Properties
Issuer
Gets or sets the issuer (<c>iss</c>): who made the token, as the services that check it expect. Required.
Type: string?
Audience
Gets or sets the audience (<c>aud</c>): who the token is for, as the services that check it expect. Required.
Type: string?
Keys
Gets the signing keys: the first signs, every one is accepted and published. To change keys, put the new key first and keep the old one until the tokens it signed have expired.
Type: List<DapperMaticJwtKey>
AccessTokenLifetime
Gets or sets how long an access token lasts. Default is 15 minutes: the refresh token gets another.
Type: TimeSpan?