ServerSideSessions class
Management functions for ServerSideSessions.
This should be used instead of ServerSideSession.db.
Constructors
- ServerSideSessions({required ServerSideSessionsConfig config, AuthUsers authUsers = const AuthUsers()})
- Creates a new ServerSideSessions instance.
Properties
- admin → ServerSideSessionsAdmin
-
Admin-related functions for managing session.
final
- authUsers → AuthUsers
-
Management functions for auth users.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
authenticationHandler(
Session session, String key) → Future< AuthenticationInfo?> -
Looks up the
AuthenticationInfobelonging to thekey. -
createSession(
Session session, {required UuidValue authUserId, required String method, Set< Scope> ? scopes, DateTime? expiresAt, Duration? expireAfterUnusedFor, bool skipUserBlockedChecked = false, Transaction? transaction}) → Future<AuthSuccess> - Create a session for the user, returning the secret session key to be used for the authentication header.
-
listSessions(
Session session, {UuidValue? authUserId, String? method, Transaction? transaction}) → Future< List< ServerSideSessionInfo> > - List all sessions matching the given filters.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
revokeAllSessions(
Session session, {required UuidValue authUserId, String? method, Transaction? transaction}) → Future< List< UuidValue> > - Signs out a user from the server and ends all user sessions managed by this module.
-
revokeSession(
Session session, {required UuidValue serverSideSessionId, Transaction? transaction}) → Future< bool> - Removes the specified session and thus signs out its user on its device.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited