Add session data to Call type

- AuthService.validateRequest now returns AuthResult with both user and session
- Call type includes session: SessionData | null
- Handlers can access session metadata (createdAt, authMethod, etc.)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-04 09:50:05 -06:00
parent e9ccf6d757
commit ad6d405206
4 changed files with 19 additions and 11 deletions

View File

@@ -8,6 +8,7 @@ import {
} from "express";
import type { MatchFunction } from "path-to-regexp";
import { z } from "zod";
import type { SessionData } from "./auth/types";
import { type ContentType, contentTypes } from "./content-types";
import { type HttpCode, httpCodes } from "./http-codes";
import {
@@ -39,6 +40,7 @@ export type Call = {
parameters: object;
request: ExpressRequest;
user: MaybeUser;
session: SessionData | null;
};
export type InternalHandler = (req: ExpressRequest) => Promise<Result>;