auth/deps.ts

Stateless capabilities bundle for fuz_app backends.

AppDeps is the central dependency injection type — injectable and swappable per environment (production vs test). Does not contain config (static values) or runtime state (mutable refs).

Declarations
#

2 declarations

view source

AppDeps
#

auth/deps.ts view source

AppDeps

Stateless capabilities bundle for fuz_app backends.

Injectable and swappable per environment (production vs test). Does not contain config (static values) or runtime state (mutable refs).

stat

Get file/directory stats, or null if path doesn't exist.

type (path: string) => Promise<StatResult | null>

read_file

Read a file as text.

type (path: string) => Promise<string>

delete_file

Delete a file.

type (path: string) => Promise<void>

keyring

HMAC-SHA256 cookie signing keyring.

type Keyring

password

Password hashing operations. Use argon2_password_deps in production.

db

Database instance.

type Db

log

Structured logger instance.

type Logger

on_audit_event

Called after each audit log INSERT succeeds. Use to broadcast audit events via SSE. Flows automatically to all route factories that receive deps or RouteFactoryDeps. Defaults to a noop when not wired to SSE.

type (event: AuditLogEvent) => void

RouteFactoryDeps
#