issueToken method

  1. @override
Future<AuthSuccess> issueToken(
  1. Session session, {
  2. required UuidValue authUserId,
  3. required String method,
  4. Set<Scope>? scopes,
  5. Transaction? transaction,
})
override

Issues an authentication token.

Creates a new authentication token for the specified user with the given authentication method and optional scopes.

Returns an AuthSuccess containing the generated token and user information.

Implementation

@override
Future<AuthSuccess> issueToken(
  final Session session, {
  required final UuidValue authUserId,
  required final String method,
  final Set<Scope>? scopes,
  final Transaction? transaction,
}) async {
  return jwt.createTokens(
    session,
    authUserId: authUserId,
    method: method,
    scopes: scopes,
    transaction: transaction,
  );
}