JwtConfigFromPasswords class

Creates a new JwtConfig from keys on the passwords.yaml file.

This constructor requires that a Serverpod instance has already been initialized.

Inheritance

Constructors

JwtConfigFromPasswords({List<String> fallbackRefreshTokenHashPeppers = const [], Duration accessTokenLifetime = const Duration(minutes: 10), Duration refreshTokenLifetime = const Duration(days: 14), String? issuer, int refreshTokenFixedSecretLength = 16, int refreshTokenRotatingSecretLength = 64, int refreshTokenRotatingSecretSaltLength = 16, Future<Map<String, dynamic>?> extraClaimsProvider(Session session, JwtContext context)?, List<JwtAlgorithm> fallbackVerificationAlgorithms = const []})
Creates a new JwtConfigFromPasswords instance.

Properties

accessTokenLifetime Duration
The lifetime of access tokens.
finalinherited
algorithm JwtAlgorithm
The algorithm used to sign and verify the JWT tokens.
finalinherited
extraClaimsProvider Future<Map<String, dynamic>?> Function(Session session, JwtContext context)?
Optional provider for extra claims to add to refresh tokens.
finalinherited
fallbackRefreshTokenHashPeppers List<String>
Optional fallback peppers for validating refresh tokens created with previous peppers.
finalinherited
fallbackVerificationAlgorithms List<JwtAlgorithm>
The algorithms used to verify the JWT tokens in case the primary algorithm fails. These are tried in order until one succeeds or all fail.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
issuer String?
The issuer set on the JWT access tokens.
finalinherited
refreshTokenFixedSecretLength int
The amount of random bytes used for the fixed secret part of each individual refresh token.
finalinherited
refreshTokenHashPepper String
Pepper used for hashing refresh tokens.
finalinherited
refreshTokenLifetime Duration
The lifetime of a refresh token.
finalinherited
refreshTokenRotatingSecretLength int
The amount of random bytes used for the rotating secret of the refresh token.
finalinherited
refreshTokenRotatingSecretSaltLength int
The amount of random bytes used to hash the rotation secret of the refresh token with.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build({required AuthUsers authUsers}) JwtTokenManager
Builds a new instance of the token manager.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited