SessionDriverBuilderContext class

Context passed to a SessionDriverBuilder.

The object aggregates every bit of information a driver might need to build a concrete SessionConfig. Fields are intentionally kept immutable to ensure the builder operates on a consistent snapshot of configuration.

Constructors

SessionDriverBuilderContext({required Container container, required Config rootConfig, required Map<String, dynamic> raw, required String driver, required String cookieName, required Duration lifetime, required bool expireOnClose, required bool encrypt, required Options options, required List<SecureCookie> codecs, required String cachePrefix, required List<String> keys, List<int>? lottery, CacheManager? cacheManager, StorageDefaults? storageDefaults})

Properties

cacheManager CacheManager?
Lazily-injected cache manager (may be null for non cache drivers).
final
cachePrefix String
Prefix applied to all cache keys for cache-backed drivers.
final
codecs List<SecureCookie>
Ordered list of SecureCookie codecs (primary first).
final
container Container
Application service container.
final
cookieName String
Cookie name that will be sent back to the client.
final
driver String
Normalised driver identifier (e.g. “cookie”, “redis”).
final
encrypt bool
Whether the payload is encrypted when using cookie-based storage.
final
expireOnClose bool
Whether the session should be discarded when the browser closes.
final
hashCode int
The hash code for this object.
no setterinherited
keys List<String>
Application secret(s) used when signing/encrypting cookies.
final
lifetime Duration
Logical session lifetime.
final
lottery List<int>?
Odds used by file drivers to trigger garbage collection.
final
options Options
Resolved cookie options.
final
raw Map<String, dynamic>
Parsed “session” map after normalisation/merging.
final
rootConfig Config
The root application configuration.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storageDefaults StorageDefaults?
Storage defaults reported by the storage provider.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requireCacheStore(String name) Repository
Returns the cache cache.Repository identified by name or throws ProviderConfigException if the cache manager is absent.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited