API Reference — @tuwaio/siwx (CAIP-122 Authentication Layer)
verifyStatelessDemoSession()
verifyStatelessDemoSession(
token,secret,policy?):Promise<SiwxSession|null>
Defined in: packages/siwx-server/src/server.ts:205
Verifies an authenticated stateless demo session token. Performs constant-time cryptographic verification and validates expiration and policy.
Parameters
token
string | null | undefined
Compact token from cookie (${payload}.${signature}).
secret
string
Server-only signing secret.
policy?
Optional verification policy to enforce.
Returns
Promise<SiwxSession | null>
The verified SiwxSession, or null if invalid, expired, or tampered.
Last updated on