GetSiwxServerSessionOptions
Defined in: siwx-server/src/types.ts:248
Options of getSiwxServerSession.
Properties
cookieName?
optionalcookieName?:string
Defined in: siwx-server/src/types.ts:270
The name of the cookie.
Default
"siwx-session-v2"cookieSource
cookieSource:
string|Request|Headers| {get(name):string| {value:string; } |null|undefined; } |null|undefined
Defined in: siwx-server/src/types.ts:258
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:290
Policy checked against the stored session. Only a subset applies: expectedDomain, allowedChainIds (exact
match, except that a Solana cluster matches under its name and its genesis-hash chain ID, so sessions signed for
solana:devnet stay valid) and, for durable sessions, requireExpirationTime; for demo tokens, expiry with
clockSkewSeconds.
sessionStore?
optionalsessionStore?:SiwxSessionStore
Defined in: siwx-server/src/types.ts:276
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:282
HMAC secret of the stateless demo profile. The cookie value is verified with verifyStatelessDemoSession.