cxxmcp 1.1.6
C++ MCP SDK
Loading...
Searching...
No Matches
mcp::server::AuthProvider Class Referenceabstract

Abstract authentication provider used by server integrations. More...

#include <auth.hpp>

Inheritance diagram for mcp::server::AuthProvider:
mcp::auth::DpopBearerAuthProvider mcp::auth::openssl::FetchingJwksDpopBearerAuthProvider mcp::auth::openssl::StaticJwksDpopBearerAuthProvider mcp::server::StaticBearerAuthProvider

Public Member Functions

virtual core::Result< AuthIdentityauthenticate (const AuthRequest &request)=0
 Authenticate a transport request.
 

Detailed Description

Abstract authentication provider used by server integrations.

The provider does not own request data; authenticate() receives a borrowed AuthRequest for the duration of the call and returns a value identity on success. Authentication failures and provider errors are propagated through core::Result so the caller can map them to protocol or HTTP errors.

Member Function Documentation

◆ authenticate()

virtual core::Result< AuthIdentity > mcp::server::AuthProvider::authenticate ( const AuthRequest request)
pure virtual

Authenticate a transport request.

Parameters
requestHeaders and remote metadata to evaluate.
Returns
AuthIdentity on success, or a core::Error describing denial or provider failure.
Note
Implementations may be called concurrently by transports that dispatch requests on multiple threads.

Implemented in mcp::server::StaticBearerAuthProvider, mcp::auth::openssl::StaticJwksDpopBearerAuthProvider, mcp::auth::openssl::FetchingJwksDpopBearerAuthProvider, and mcp::auth::DpopBearerAuthProvider.


The documentation for this class was generated from the following file: