Skip to main content

Module auth

Module auth 

Source
Expand description

Bearer token authentication middleware for the OAuth service.

Applied as an Axum middleware layer to the protected route group (SCIM user management). Public endpoints (discovery, token, authorize) bypass this layer.

On success, inserts AuthenticatedUser into request extensions so downstream handlers can identify the caller.

Re-exports§

pub use crate::server::middleware::AuthenticatedUser;

Functions§

require_bearer_token
Require a valid Bearer or DPoP token on the request.
require_global_service_authority
Restrict cross-tenant OAuth administration to a tenantless service authority.