|
cxxmcp 1.1.6
C++ MCP SDK
|
Static bearer-token AuthProvider for small embedded deployments and tests. More...
#include <auth.hpp>
Classes | |
| struct | Entry |
Public Member Functions | |
| StaticBearerAuthProvider (std::vector< Entry > entries) | |
| void | add_token (std::string token, AuthIdentity identity) |
| core::Result< AuthIdentity > | authenticate (const AuthRequest &request) override |
| Authenticate a transport request. | |
Static bearer-token AuthProvider for small embedded deployments and tests.
This provider validates Authorization: Bearer <token> against an in-memory token table and returns the configured identity. It is intentionally narrow: production OAuth/DPoP deployments should use an application-specific provider or the future OpenSSL/JWKS-backed provider.
|
inlineoverridevirtual |
Authenticate a transport request.
| request | Headers and remote metadata to evaluate. |
Implements mcp::server::AuthProvider.