feat: T27 AuthService DB session persistence - replace in-memory Map with SQLite sessions table

This commit is contained in:
2026-06-26 14:55:38 +02:00
parent 04271d4cbd
commit 1d6c2cb30e
4 changed files with 59 additions and 17 deletions
+13
View File
@@ -72,6 +72,13 @@ export interface DBUser {
updated_at: string;
}
export interface DBSession {
token: string;
user_id: string;
expires_at: number;
created_at: string;
}
export interface DatabaseInterface {
init(): Promise<void>;
close(): void;
@@ -119,4 +126,10 @@ export interface DatabaseInterface {
// Settings
getSetting(key: string): DBSetting | null;
setSetting(key: string, value: string): void;
// Sessions
createSession(data: Partial<DBSession>): DBSession;
getSession(token: string): DBSession | null;
deleteSession(token: string): boolean;
deleteExpiredSessions(): void;
}