Expand description
Puerto’s auth runtime (ADR-0021): the adapters of puerto_nucleo::auth::Autenticador.
- feature
oidc— [oidc::AutenticadorOidc]: verifies the access tokens of an OpenID Connect provider (Auth0, Keycloak, …) and reads the caller’s roles from a configurable claim. Which provider is configuration, not code. - feature
local— [local::HasherArgon2]: theHasherContrasenaof a project that keeps its own accounts. Its sessions, and theAutenticadorthat reads them, arepuerto-sqlx’s.
A route never sees which one checked its caller: puerto_web::auth::BearerAuth asks the
Arc<dyn Autenticador> that bootstrap.rs registers.
Structs§
- Principal
- The authenticated caller.
Enums§
- Error
Auth - Why a token did not become a
Principal. The first two are the caller’s (401), the last is ours (503): the adapter logs the cause, the API answers the code.
Traits§
- Autenticador
- Turns a bearer token into the caller.
bootstrap.rsregisters one on the routes;puerto_web::auth::BearerAuthasks it on every protected request.