GetSiwxServerSessionOptions
Defined in: siwx-server/src/types.ts:225
Options of getSiwxServerSession.
Properties
cookieName?
optionalcookieName?:string
Defined in: siwx-server/src/types.ts:247
The name of the cookie.
Default
"siwx-session-v2"cookieSource
cookieSource:
string|Request|Headers| {get:string| {value:string; } |null|undefined; } |null|undefined
Defined in: siwx-server/src/types.ts:235
Where to read the session cookie from:
- a
Cookieheader string ("siwx-session-v2=…; other=…") or the bare cookie value; - a Web API
Request; - the Next.js cookie store (
await cookies()) or any object withget(name)returning{ value }or a string; - a Web API
Headersobject.
null and undefined resolve to no session.
policy?
optionalpolicy?:SiwxVerificationPolicy
Defined in: siwx-server/src/types.ts:265
Policy checked against the stored session. Only a subset applies: expectedDomain, allowedChainIds (exact
match) and, for durable sessions, requireExpirationTime; for demo tokens, expiry with clockSkewSeconds.
sessionStore?
optionalsessionStore?:SiwxSessionStore
Defined in: siwx-server/src/types.ts:253
Store of the durable profile. The cookie value is looked up with sessionStore.get. Takes precedence over
signingSecret.
signingSecret?
optionalsigningSecret?:string
Defined in: siwx-server/src/types.ts:259
HMAC secret of the stateless demo profile. The cookie value is verified with verifyStatelessDemoSession.