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 Standard auth guard resolver for fuz_app.
Reads each axis of the four-axis RouteAuth shape and emits the corresponding middleware:
- account === 'required' or actor === 'required' → pre-validation require_auth
- roles?.length → post-authorization require_role(roles) (multi-role any-of)
- credential_types?.length → post-authorization require_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