Jwt constructor
Creates a new instance of Jwt.
Implementation
Jwt({
required this.config,
this.authUsers = const AuthUsers(),
}) : jwtUtil = JwtUtil(
accessTokenLifetime: config.accessTokenLifetime,
issuer: config.issuer,
algorithm: config.algorithm,
fallbackVerificationAlgorithms: config.fallbackVerificationAlgorithms,
),
refreshTokenSecretHash = Argon2HashUtil(
hashPepper: config.refreshTokenHashPepper,
fallbackHashPeppers: config.fallbackRefreshTokenHashPeppers,
hashSaltLength: config.refreshTokenRotatingSecretSaltLength,
),
admin = JwtAdmin(
refreshTokenLifetime: config.refreshTokenLifetime,
jwtUtil: JwtUtil(
accessTokenLifetime: config.accessTokenLifetime,
issuer: config.issuer,
algorithm: config.algorithm,
fallbackVerificationAlgorithms:
config.fallbackVerificationAlgorithms,
),
refreshTokenSecretHash: Argon2HashUtil(
hashPepper: config.refreshTokenHashPepper,
fallbackHashPeppers: config.fallbackRefreshTokenHashPeppers,
hashSaltLength: config.refreshTokenRotatingSecretSaltLength,
),
refreshTokenRotatingSecretLength:
config.refreshTokenRotatingSecretLength,
);