SessionConfig class

Settings of the session, see SessionMiddleware.

AppConfig(
  session: SessionConfig(driver: 'cache', store: 'redis'),
);

Constructors

SessionConfig({String driver = 'cookie', String? store, String cookie = 'dox_session', Duration lifetime = const Duration(hours: 2), String path = '/', String? domain, bool httpOnly = true, bool? secure, SameSite? sameSite = SameSite.lax})
const

Properties

The name of the session cookie.
final
domain → String?
Domain of the cookie. null: only the host that set it.
final
driver → String
Where the data lives:
final
hashCode → int
The hash code for this object.
no setterinherited
httpOnly → bool
Page scripts can not read the cookie. Keep it true.
final
lifetime → Duration
How long a session lives after its last change.
final
path → String
Path of the cookie.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sameSite → SameSite?
SameSite of the cookie. lax stops most cross site requests.
final
secure → bool?
null: Secure when the request came over https. Set true or false to choose yourself.
final
store → String?
The cache store name for the cache driver, like redis, memory or file. null uses the default store of AppConfig.cache.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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