← ClaudeAtlas

hex-restapi-authlisted

Use when an HTTP entrypoint must authenticate its caller or gate a route on a role. Owns the caller identity, the token-verifier port and adapter, the `get_current_user` / `require_role` route dependencies, the role-rank gate, the RFC-7235 challenge, and the 401/403 codes a route advertises because of them — a route's other error codes are `hex-restapi-endpoint`'s. - Adding auth to a REST service, choosing between an authenticated and a role-gated route, wiring a token verifier, or deciding what an authenticated route advertises in OpenAPI.
wntic/pyhouse · ★ 3 · API & Backend · score 76
Install: claude install-skill wntic/pyhouse
# Hex REST — Auth Authentication and transport-level authorization for a hexagonal REST service. Everything here is **optional**: a service whose routes need no caller identity — a public API, an internal worker-facing one, or one behind a gateway that authenticates for it and passes nothing inward — declares no auth and never loads this skill; one that reads the caller from a gateway's header takes the gateway binding under *Other bindings*. The REST core (`hex-restapi-app`, `hex-restapi-endpoint`, `hex-restapi-schema`) is complete without it. **Auth is conditional, not presumed.** An app has auth when some endpoint is non-anonymous, or a token-verifier capability is wired — there is no separate flag for it. "Adding auth" means adding the artifacts below; an app whose every endpoint is anonymous has **no auth layer at all**, which is the absence of the feature rather than "skipping auth". The principle this binds: **the entrypoint authenticates the caller, resolves a caller identity, and passes it inward as ordinary data on a command or query DTO.** No layer below the entrypoint knows how authentication happened. Authorization that is a *business* rule is a domain concern; authorization that is a *transport* rule — a single role-rank check — belongs here. ## When to use vs. neighbours - The app shell, middleware, the central error translator and `schemas/errors.py` → `hex-restapi-app`. - A route's signature and body → `hex-restapi-endpoint`. - Which error codes a route