Class JwtOptions
- Namespace
- Builvero.Application.Options
- Assembly
- Builvero.Application.dll
Configuration options for JWT (JSON Web Token) authentication.
public sealed class JwtOptions
- Inheritance
-
JwtOptions
- Inherited Members
Remarks
These options are typically configured in appsettings.json or via environment variables.
All properties are required in non-Test environments for proper JWT token generation and validation.
The JWT key should be a secure random string (at least 32 characters) used for signing tokens. In production, this should be stored securely (e.g., AWS SSM Parameter Store) and not committed to source control.
Fields
SectionName
Configuration section name for JWT options in appsettings.json.
public const string SectionName = "Jwt"
Field Value
- string
- Configuration options for JWT (JSON Web Token) authentication.
Properties
Audience
Gets or sets the audience claim value for JWT tokens.
public string Audience { get; init; }
Property Value
- string
- Configuration options for JWT (JSON Web Token) authentication.
Remarks
This identifies the recipients that the JWT is intended for. Typically set to the API's base URL or application name. Example: "https://api.builvero.com" or "BuilveroAPI"
Issuer
Gets or sets the issuer claim value for JWT tokens.
public string Issuer { get; init; }
Property Value
- string
- Configuration options for JWT (JSON Web Token) authentication.
Remarks
This identifies the party that issued the JWT. Typically set to the API's base URL or application name. Example: "https://api.builvero.com" or "BuilveroAPI"
Key
Gets or sets the secret key used for signing JWT tokens.
public string Key { get; init; }
Property Value
- string
- Configuration options for JWT (JSON Web Token) authentication.
Remarks
This should be a secure random string (minimum 32 characters recommended). The key is used with HMAC-SHA256 algorithm to sign tokens.
In production, this should be stored securely (e.g., AWS SSM Parameter Store, environment variables) and never committed to source control. The key is typically generated during deployment.