UNPKG

@toruslabs/session-manager

Version:
15 lines (14 loc) 621 B
import { BaseSessionManager } from "./base"; import type { SessionManagerOptions } from "./interfaces"; export declare class SessionManager<T> extends BaseSessionManager<T> { sessionServerBaseUrl: string; sessionNamespace: string; sessionTime: number; sessionId: string; constructor({ sessionServerBaseUrl, sessionNamespace, sessionTime, sessionId }?: SessionManagerOptions); static generateRandomSessionKey(): string; createSession(data: T): Promise<string>; authorizeSession(): Promise<T>; updateSession(data: Partial<T>): Promise<void>; invalidateSession(): Promise<boolean>; }