import { type MandarineSecurity } from "https://deno.land/x/mandarinets@v2.3.2/mod.ts";
const { SessionStore } = MandarineSecurity.Sessions;
Represents how a SessionStore implementation should be designed. SessionStore is used to design & use the process of manipulating sessions
Methods
get(sessionID: string, config?: { touch: boolean; }): Mandarine.Security.Sessions.MandarineSession | undefined
Gets a session. If it does not exist returns undefined. If param config.touch = true, updates the expiration of the session
set(): Mandarine.Security.Sessions.MandarineSession
sessionID: string,
session: Mandarine.Security.Sessions.MandarineSession,
config?: { override: boolean; },
Adds a session to the session container. For overriding, set config.override to true
Handles the elimination of all expired sessions. This function is called in an internal interval managed by Mandarine.