Function: verifyApiToken()
verifyApiToken(
args):boolean
Defined in: apiToken.ts:62
Constant-time check of a plain token against a stored hash, optionally validating expiration.
Parameters
| Parameter | Type | Description |
|---|---|---|
args | { expiresAt?: Date | null; token: string; tokenHash: string; } | - |
args.expiresAt? | Date | null | When provided, the token is rejected after this date. Omit (or pass null) for tokens that never expire. |
args.token | string | - |
args.tokenHash | string | - |
Returns
boolean