cxxmcp 1.1.6
C++ MCP SDK
Loading...
Searching...
No Matches
mcp::auth::OAuthClientFlow Class Reference

Built common browser + PKCE OAuth client flow. More...

#include <client_orchestrator.hpp>

Public Member Functions

 OAuthClientFlow (const OAuthClientFlow &)=delete
 
OAuthClientFlowoperator= (const OAuthClientFlow &)=delete
 
 OAuthClientFlow (OAuthClientFlow &&)=delete
 
OAuthClientFlowoperator= (OAuthClientFlow &&)=delete
 
core::Result< TokenSetauthorize ()
 Execute discovery, client setup, authorization, and token exchange.
 
core::Result< std::string > get_access_token ()
 Return a currently valid access token, refreshing when needed.
 
core::Result< OAuthRefreshRetryResulthandle_auth_response (const HttpResponseMetadata &response)
 Handle an unauthorized HTTP response and decide whether to retry.
 
OAuthLifecycleState lifecycle_state () const
 Get the current lifecycle state.
 
const OAuthClientConfigclient_config () const
 Get the current client configuration.
 
const std::optional< AuthorizationServerMetadata > & metadata () const
 Get the discovered authorization server metadata.
 
const std::optional< ProtectedResourceMetadata > & protected_resource_metadata () const
 Get the discovered protected resource metadata.
 

Friends

class OAuthClientFlowBuilder
 

Detailed Description

Built common browser + PKCE OAuth client flow.

OAuthClientOrchestrator keeps transport and callback dependencies injectable by reference. OAuthClientFlow keeps dependency handles through shared_ptr so applications can assemble owned endpoints and application-owned references through OAuthClientFlowBuilder.


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