cxxmcp 1.1.6
C++ MCP SDK
Loading...
Searching...
No Matches
mcp::auth::OAuthClientCallback Class Referenceabstract

Callback interface for the OAuth client orchestrator. More...

#include <client_orchestrator.hpp>

Public Member Functions

virtual core::Result< core::Unitpresent_authorization_url (const std::string &url)=0
 Present the authorization URL to the user (e.g.
 
virtual core::Result< std::pair< std::string, std::string > > wait_for_callback (std::chrono::seconds timeout)=0
 Wait for the authorization code callback.
 

Detailed Description

Callback interface for the OAuth client orchestrator.

Applications implement these methods to provide browser launching, redirect receiving, and user interaction. This keeps the orchestrator free of platform-specific code.

Member Function Documentation

◆ present_authorization_url()

virtual core::Result< core::Unit > mcp::auth::OAuthClientCallback::present_authorization_url ( const std::string &  url)
pure virtual

Present the authorization URL to the user (e.g.

open a browser).

Parameters
urlThe full authorization URL to present.
Returns
Unit on success, or an error if the URL cannot be presented.

◆ wait_for_callback()

virtual core::Result< std::pair< std::string, std::string > > mcp::auth::OAuthClientCallback::wait_for_callback ( std::chrono::seconds  timeout)
pure virtual

Wait for the authorization code callback.

This method blocks until the user completes the authorization flow and the redirect delivers the authorization code, or until timeout.

Parameters
timeoutMaximum time to wait.
Returns
A pair of (authorization_code, state), or an error.

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