import { default } from "https://deno.land/x/xserver@5.2.2/src/session.ts";
Methods
decrypt(encrypted: string, secret?: string)
domain(domain: string): Session
The set-cookie Domain header.
encrypt(data: string, secret?: string)
expiration(expiration: number): Session
The number of milliseconds the session/cookie is valid default is 1 day or 24 hours.
forbidden(forbidden: Forbidden): Session
httpOnly(httpOnly: boolean): Session
The set-cookie HttpOnly header.
sameSite(sameSite: SameSite): Session
The set-cookie SameSite header.
secret(secret: string): Session
The secret to use to encrypt/decrrypt the cookies.
secure(secure: boolean): Session
The set-cookie Secure header.
sign()
encrypted: string,
stamped: string,
signature?: string,
signature(signature: string): Session
The signature to use to sign/unsign the cookies.
stamp(time: number)
unauthorized(unauthorized: Unauthorized): Session
unsign()
encrypted: string,
stamped: string,
signed: string,
signature?: string,
unstamp(time: string)
validate(validate: Validate): Session