ServerSideSessionsConfig constructor

ServerSideSessionsConfig({
  1. required String sessionKeyHashPepper,
  2. List<String> fallbackSessionKeyHashPeppers = const [],
  3. int sessionKeySecretLength = 32,
  4. int sessionKeyHashSaltLength = 16,
  5. Duration? defaultSessionLifetime,
  6. Duration? defaultSessionInactivityTimeout,
})

Create a new user session configuration.

Implementation

ServerSideSessionsConfig({
  required this.sessionKeyHashPepper,
  this.fallbackSessionKeyHashPeppers = const [],
  this.sessionKeySecretLength = 32,
  this.sessionKeyHashSaltLength = 16,
  this.defaultSessionLifetime,
  this.defaultSessionInactivityTimeout,
}) {
  _validateSessionKeyHashPepper(sessionKeyHashPepper);
  for (final fallbackPepper in fallbackSessionKeyHashPeppers) {
    _validateSessionKeyHashPepper(fallbackPepper);
  }
  _validateSessionLifetime(defaultSessionLifetime);
  _validateSessionInactivityTimeout(defaultSessionInactivityTimeout);
}