ServerSideSessionsConfig constructor
ServerSideSessionsConfig({
- required String sessionKeyHashPepper,
- List<
String> fallbackSessionKeyHashPeppers = const [], - int sessionKeySecretLength = 32,
- int sessionKeyHashSaltLength = 16,
- Duration? defaultSessionLifetime,
- Duration? defaultSessionInactivityTimeout,
- Future<
void> onSessionCreated(- Session session, {
- required UuidValue authUserId,
- required UuidValue serverSideSessionId,
- required Transaction? transaction,
Create a new user session configuration.
Implementation
ServerSideSessionsConfig({
required this.sessionKeyHashPepper,
this.fallbackSessionKeyHashPeppers = const [],
this.sessionKeySecretLength = 32,
this.sessionKeyHashSaltLength = 16,
this.defaultSessionLifetime,
this.defaultSessionInactivityTimeout,
this.onSessionCreated,
}) {
_validateSessionKeyHashPepper(sessionKeyHashPepper);
for (final fallbackPepper in fallbackSessionKeyHashPeppers) {
_validateSessionKeyHashPepper(fallbackPepper);
}
_validateSessionLifetime(defaultSessionLifetime);
_validateSessionInactivityTimeout(defaultSessionInactivityTimeout);
}