TypeScript API / laikacms/auth / PatRecord
Interface: PatRecord
Storage-agnostic PAT record shape. Consumers persist this however they like (SQL table, DynamoDB item, ...); this module never touches storage directly, it only shapes and hashes the data.
tokenHash is the sha256 hex digest of the full bearer string (lk_pat_<secret>). The plaintext secret is never stored.
Properties
createdAt
ts
createdAt: string;expiresAt?
ts
optional expiresAt?: string | null;id
ts
id: string;lastUsedAt?
ts
optional lastUsedAt?: string | null;name?
ts
optional name?: string;revokedAt?
ts
optional revokedAt?: string | null;scopes
ts
scopes: Scope[];tokenHash
ts
tokenHash: string;tokenPreview
ts
tokenPreview: string;Short, non-secret prefix of the token, useful for UI identification.
userId
ts
userId: string;