Skip to main content

Interface: AccessTokenVerifierOptions

Defined in: createAccessTokenVerifier.ts:15

Options for createAccessTokenVerifier.

Properties

hashToken?

optional hashToken?: (token) => string

Defined in: createAccessTokenVerifier.ts:24

Override the hashing applied to the presented token before lookup. Defaults to SHA-256 (hex) — the same hash generateApiToken produces, so tokens minted there verify with no extra wiring. The plaintext is never stored or compared directly.

Parameters

ParameterType
tokenstring

Returns

string


store

store: AccessTokenStore

Defined in: createAccessTokenVerifier.ts:17

App-provided persistence for access tokens.


touchLastUsed?

optional touchLastUsed?: boolean

Defined in: createAccessTokenVerifier.ts:31

When true, record lastUsedAt on every successful verification via store.touchLastUsed. Fire-and-forget: the write never blocks the verification result and a failure is swallowed.

Default

false