cxxmcp 1.1.6
C++ MCP SDK
Loading...
Searching...
No Matches
loopback_receiver.hpp
Go to the documentation of this file.
1// Copyright (c) 2025 [caomengxuan666]
2
3#pragma once
4
5#include <chrono>
6#include <cstdint>
7#include <mutex>
8#include <optional>
9#include <string>
10#include <thread>
11#include <utility>
12
13#include "cxxmcp/auth/types.hpp"
15
18
19namespace mcp::auth {
20
24 int port = 0;
26 std::string path = "/callback";
28 std::chrono::seconds timeout{300};
29};
30
33 std::string authorization_code;
34 std::string state;
35};
36
39 std::string redirect_uri;
41};
42
43} // namespace mcp::auth
Shared lightweight value types for cxxmcp auth contracts.
Shared result and error primitives used by the public cxxmcp SDK.
Result from the loopback redirect receiver.
Definition loopback_receiver.hpp:32
Configuration for the loopback redirect receiver.
Definition loopback_receiver.hpp:22
std::chrono::seconds timeout
Maximum time to wait for the callback before timing out.
Definition loopback_receiver.hpp:28
std::string path
Path to expect the callback on (e.g. "/callback").
Definition loopback_receiver.hpp:26
int port
Port to listen on. 0 = auto-assign an available port.
Definition loopback_receiver.hpp:24
Callback result from the receiver including the redirect URI used.
Definition loopback_receiver.hpp:38