Skip to main content

bearer_middleware

Function bearer_middleware 

Source
pub async fn bearer_middleware(
    __arg0: State<Arc<McpAuthState>>,
    req: Request<Body>,
    next: Next,
) -> Response
Expand description

axum middleware for the MCP path: authenticates, then stores the McpPrincipal in request extensions for the server handler to read.