authMiddleware<R extends string>(ctx: AuthContext<R>,next: Next): Promise<void>
Requires a valid session token in the Authorization header, and puts its
payload in ctx.state.user for the rest of the route.
ctx: AuthContext<R>
authMiddleware<R extends string>(ctx: AuthContext<R>,next: Next): Promise<void>
Requires a valid session token in the Authorization header, and puts its
payload in ctx.state.user for the rest of the route.
ctx: AuthContext<R>
import { authMiddleware } from "api/middleware/auth.ts";