Template
1
0

feat: add functional authentication

This commit is contained in:
2025-08-12 23:11:08 +02:00
parent f0630d43b7
commit 82d7a0d9cd
74 changed files with 763 additions and 396 deletions

View File

@@ -1,3 +1,4 @@
import { Session } from "../auth/auth.ts";
import { asyncLocalStorage } from "./storage.ts";
export const req = {
@@ -24,14 +25,14 @@ export const req = {
/**
* Check if the request is authenticated.
*/
get isAuthenticated() {
get isAuthenticated(): boolean {
return this.session !== undefined;
},
/**
* Get current session.
*/
get session() {
get session(): Session | undefined {
return this.store.session;
},