initial commit
Some checks failed
CI / Go — node-agent tests (push) Has been cancelled
CI / Go — edge-gateway build (push) Has been cancelled
CI / Node — lint, typecheck, test, build (push) Has been cancelled

This commit is contained in:
smueller
2026-06-26 10:45:08 +02:00
commit e37ea87b35
118 changed files with 7726 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
export enum UserRole {
USER = 'USER',
SUPPORT = 'SUPPORT',
MODERATOR = 'MODERATOR',
ADMIN = 'ADMIN',
SUPER_ADMIN = 'SUPER_ADMIN',
}
export interface AuthenticatedUser {
id: string;
email: string;
username: string;
roles: UserRole[];
}
export interface SessionContext {
user: AuthenticatedUser;
sessionId: string;
issuedAt: Date;
expiresAt: Date;
}
export interface AuthTokenPayload {
sub: string;
sessionId: string;
roles: UserRole[];
iat?: number;
exp?: number;
}