MandarineSecurity.Sessions.SessionStore
import type { MandarineSecurity } from "https://raw.githubusercontent.com/mandarineorg/mandarinets/master/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
Handles the elimination of all expired sessions. This function is called in an internal interval managed by Mandarine.
Gets a session. If it does not exist returns undefined. If param config.touch = true, updates the expiration of the session
Gets all the sessions in the session container
Returns a boolean specifying whether expired sessions should be autocleared by an internal handler
Expiration time of a session (IN MS) Default: (1000 * 60 * 60 * 24) (1 day)
Interval in milliseconds to call expired sessions cleaner Default: (1000 * 60 * 60) (1 hour)
Prepares session store. Called when mounting session container during Mandarine Build Time (MBT).
Adds a session to the session container. For overriding, set config.override to true
Updates the expiration of a session