AuthApiKey class final

Public API-key metadata. It never contains the secret or its hash.

Constructors

AuthApiKey({required String id, required String userId, required String name, required String keyPrefix, required List<String> scopes, required DateTime createdAt, required DateTime updatedAt, required bool active, DateTime? expiresAt, DateTime? lastUsedAt, DateTime? revokedAt})
Creates a public API-key projection.
const

Properties

active bool
Whether the key is currently usable.
final
createdAt DateTime
Time at which the key was created.
final
expiresAt DateTime?
Time after which the key is inactive, if configured.
final
hashCode int
The hash code for this object.
no setterinherited
id String
Stable identifier for this key.
final
keyPrefix String
Non-secret prefix used to identify the key family.
final
lastUsedAt DateTime?
Time at which the key was last used, if known.
final
name String
Human-readable key name.
final
revokedAt DateTime?
Time at which the key was revoked, if revoked.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scopes List<String>
Scopes granted to this key.
final
updatedAt DateTime
Time at which the record was last changed.
final
userId String
Identifier of the owning user.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this public projection without exposing key material.
toString() String
A string representation of this object.
inherited

Operators

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