Class JwtSigningOptions
jwt signing options for consuming jwts.
Inherited Members
Namespace: FastEndpoints.Security
Assembly: FastEndpoints.Security.dll
Syntax
public sealed class JwtSigningOptions
Properties
KeyIsPemEncoded
specifies whether the key is pem encoded.
Declaration
public bool KeyIsPemEncoded { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
SigningKey
the key used to sign jwts symmetrically or the base64 encoded public-key when jwts are signed asymmetrically. the key can be optional when used to verify tokens issued by an idp where public key retrieval happens dynamically.
Declaration
public string? SigningKey { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
the key can be in PEM format. make sure to set KeyIsPemEncoded to true if the key is PEM encoded.
SigningStyle
specifies how tokens were signed. symmetrically or asymmetrically.
Declaration
public TokenSigningStyle SigningStyle { get; set; }
Property Value
| Type | Description |
|---|---|
| TokenSigningStyle |
Methods
UpdateSigningKey(string?)
call this method to update the jwt signing key during runtime. all future token verifications will use the supplied key.
Declaration
public void UpdateSigningKey(string? key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | the new jwt signing key to use for generating a SecurityKey |