daton/lib/src/http/session/SessionManager.ts

17 lines
509 B
TypeScript
Raw Normal View History

import AppClass from '../../lifecycle/AppClass.ts'
import Session from './Session.ts'
export class InvalidSessionKeyError extends Error {
constructor(key: any) {
super(`Invalid session key: ${key}. No session exists.`)
}
}
export default abstract class SessionManager extends AppClass {
public abstract async get_session(key?: string): Promise<Session>
public abstract async has_session(key: string): Promise<boolean>
public abstract async purge(key?: string): Promise<void>
}