File tree Expand file tree Collapse file tree 6 files changed +997
-0
lines changed
Expand file tree Collapse file tree 6 files changed +997
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,30 @@ if(AGENT_CPP_BUILD_MCP)
9999 message (STATUS "MCP client enabled (using cpp-httplib)" )
100100endif ()
101101
102+ # OAuth library for handling OAuth 2.0 authorization flows
103+ option (AGENT_CPP_BUILD_OAUTH "Build OAuth client (requires OpenSSL)" OFF )
104+
105+ if (AGENT_CPP_BUILD_OAUTH)
106+ find_package (OpenSSL REQUIRED)
107+
108+ add_library (oauth STATIC
109+ src/oauth/oauth.cpp
110+ src/oauth/token_storage.cpp
111+ )
112+ add_library (agent-cpp::oauth ALIAS oauth)
113+ target_include_directories (oauth
114+ PUBLIC
115+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /src>
116+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /deps/cpp-httplib>
117+ $<BUILD_INTERFACE:${LLAMA_SOURCE_DIR} /common>
118+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} /agent-cpp>
119+ )
120+ target_link_libraries (oauth PUBLIC common OpenSSL::SSL OpenSSL::Crypto)
121+ target_compile_features (oauth PUBLIC cxx_std_17)
122+
123+ message (STATUS "OAuth client enabled (using cpp-httplib)" )
124+ endif ()
125+
102126if (AGENT_CPP_BUILD_TESTS)
103127 enable_testing ()
104128
You can’t perform that action at this time.
0 commit comments