auth/auth_guard_resolver.ts view source
(auth: { account: "none" | "optional" | "required"; actor: "none" | "optional" | "required"; roles?: readonly string[] | undefined; credential_types?: readonly string[] | undefined; }): AuthGuards import {fuz_auth_guard_resolver} from '@fuzdev/fuz_app/auth/auth_guard_resolver.js'; Standard auth guard resolver for fuz_app.
Reads each axis of the four-axis RouteAuth shape and emits the corresponding middleware:
account === 'required'oractor === 'required'→ pre-validation require_authroles?.length→ post-authorizationrequire_role(roles)(multi-role any-of)credential_types?.length→ post-authorizationrequire_credential_types(types)
Multiple post-authorization guards run in declaration order: credential type check first (since failing it implies the request can never resolve a usable identity), role check second.
auth
{ account: "none" | "optional" | "required"; actor: "none" | "optional" | "required"; roles?: readonly string[] | undefined; credential_types?: readonly string[] | undefined; }returns
AuthGuards