cxxmcp 1.1.6
C++ MCP SDK
Loading...
Searching...
No Matches
jwks.hpp File Reference

JWKS value models, parsing, fetch, and cache contracts. More...

#include <nlohmann/json.hpp>
#include <optional>
#include <string>
#include <utility>
#include <vector>
#include "cxxmcp/auth/lifecycle.hpp"
#include "cxxmcp/core/result.hpp"

Go to the source code of this file.

Classes

struct  mcp::auth::JsonWebKey
 Public JSON Web Key value model. More...
 
struct  mcp::auth::JsonWebKeySet
 JSON Web Key Set value model. More...
 
struct  mcp::auth::JwkSelectionCriteria
 Criteria for selecting a public JWK before verification. More...
 
struct  mcp::auth::JwksFetchRequest
 Request for retrieving a JWKS document. More...
 
class  mcp::auth::JwksEndpoint
 Application-provided JWKS retrieval boundary. More...
 
class  mcp::auth::JwksCache
 Application-provided JWKS cache boundary. More...
 
class  mcp::auth::InMemoryJwksCache
 In-process JWKS cache for tests and embedded clients. More...
 

Functions

core::Result< JsonWebKeymcp::auth::parse_json_web_key (const nlohmann::json &value)
 Parse a public JWK from JSON without performing trust decisions.
 
core::Result< JsonWebKeySetmcp::auth::parse_json_web_key_set (const nlohmann::json &value)
 Parse a public JWKS document from JSON.
 
core::Result< JsonWebKeymcp::auth::select_json_web_key (const JsonWebKeySet &set, const JwkSelectionCriteria &criteria)
 Select a single JWK by stable JWT header criteria.
 

Detailed Description

JWKS value models, parsing, fetch, and cache contracts.

Function Documentation

◆ select_json_web_key()

core::Result< JsonWebKey > mcp::auth::select_json_web_key ( const JsonWebKeySet set,
const JwkSelectionCriteria criteria 
)
inline

Select a single JWK by stable JWT header criteria.

If the criteria match no key or multiple keys, the result is an error so a verifier cannot accidentally continue with an ambiguous key.