TomServerJwtToken constructor
TomServerJwtToken(})
Creates a new server-side JWT token.
publicData contains claims visible in the token payload.
encryptedData contains sensitive claims that will be RSA-encrypted.
expiresIn is how long until the token expires (default: 2 hours).
notBefore is the delay before the token becomes valid (default: 0).
noIssueAt whether to omit the "iat" claim (default: false).
audience the aud claim, when the token is meant for one service.
signingConfiguration optional custom configuration for signing.
Implementation
TomServerJwtToken(
this.publicData, {
this.encryptedData = const {},
this.expiresIn = const Duration(hours: 2),
this.notBefore = const Duration(seconds: 0),
this.noIssueAt = false,
this.audience,
TomJwtConfiguration? signingConfiguration,
}) {
this.signingConfiguration =
signingConfiguration ?? this.signingConfiguration;
}