MultiTokenManager class

A composite token manager that delegates operations to multiple underlying token managers.

This class allows for managing multiple token types or providers through a single interface. The primaryTokenManager is used for issuing new tokens, while all managers in _allTokenManagers (which includes both the primary and additional managers) are used for management operations like listing and revoking tokens.

Implemented types

Constructors

MultiTokenManager({required TokenManager primaryTokenManager, required List<TokenManager> additionalTokenManagers})
Creates a new MultiTokenManager instance.

Properties

hashCode int
The hash code for this object.
no setterinherited
primaryTokenManager TokenManager
The primary token manager used for issuing new tokens.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getTokenManager<T extends TokenManager>() → T
Retrieves the token manager of type T.
issueToken(Session session, {required UuidValue authUserId, required String method, Set<Scope>? scopes, Transaction? transaction}) Future<AuthSuccess>
Issues an authentication token.
override
listTokens(Session session, {required UuidValue? authUserId, String? method, String? tokenIssuer, Transaction? transaction}) Future<List<TokenInfo>>
Lists all TokenInfos matching the given criteria.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
revokeAllTokens(Session session, {required UuidValue? authUserId, Transaction? transaction, String? method, String? tokenIssuer}) Future<void>
Revokes all tokens matching the given criteria.
override
revokeToken(Session session, {required String tokenId, Transaction? transaction, String? tokenIssuer}) Future<void>
Revokes a specific token by its ID.
override
toString() String
A string representation of this object.
inherited
validateToken(Session session, String token) Future<AuthenticationInfo?>
Validates an authentication token and returns the associated authentication information.
override

Operators

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