Skip to main content

Module middleware

Module middleware 

Source
Expand description

Static-Bearer authentication middleware for the NotedThat API.

Enums§

AuthContext
Authentication state established at the HTTP boundary.

Functions§

auth_context
Return the request authentication context, defaulting to anonymous when the auth layer has not run.
auth_middleware
Axum middleware that validates the Authorization: Bearer <token> header.
extract_request_id
Extract the x-request-id value from request extensions, falling back to a generated UUID if the SetRequestId middleware hasn’t run yet.
is_internal_path
Returns whether a decoded, knowledge-base-relative path is in the internal namespace.