JwtConfigFromPasswords constructor
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< extraClaimsProvider(String, dynamic> ?>- Session session,
- JwtContext context
- List<
JwtAlgorithm> fallbackVerificationAlgorithms = const [],
Creates a new JwtConfigFromPasswords instance.
Implementation
JwtConfigFromPasswords({
super.fallbackRefreshTokenHashPeppers,
super.accessTokenLifetime,
super.refreshTokenLifetime,
super.issuer,
super.refreshTokenFixedSecretLength,
super.refreshTokenRotatingSecretLength,
super.refreshTokenRotatingSecretSaltLength,
super.extraClaimsProvider,
super.fallbackVerificationAlgorithms,
}) : super(
refreshTokenHashPepper: Serverpod.instance.getPasswordOrThrow(
'jwtRefreshTokenHashPepper',
),
algorithm: JwtAlgorithm.hmacSha512(
SecretKey(
Serverpod.instance.getPasswordOrThrow('jwtHmacSha512PrivateKey'),
),
),
);