Skip to main content
Module

x/oak_sessions/mod.ts>Session

Session middleware for Oak
Go to Latest
class Session
Re-export
import { Session } from "https://deno.land/x/oak_sessions@v4.0.0/mod.ts";

Constructors

new
private
Session(
sid: string,
data: SessionData,
ctx: Context,
)

Properties

private
ctx: Context
private
data: SessionData
sid: string

Methods

private
persistSessionData(store: Store | CookieStore): Promise<void> | void
private
reupSession(store: Store | CookieStore, expiration: number | null | undefined)
deleteSession(): Promise<void>
flash(key: string, value: unknown)
get(key: string)
has(key: string)
set(key: string, value: unknown)

Static Methods

private
createSession(
ctx: Context,
store: Store | CookieStore,
expiration: number | null | undefined,
): Promise<Session>
private
sessionValid(sessionData: SessionData)
initMiddleware(store?: Store | CookieStore, unnamed 1?: SessionOptions)