You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
509 B
17 lines
509 B
4 years ago
|
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>
|
||
|
|
||
|
}
|