25#include <unordered_map>
41 std::string issued_token_type;
42 std::string credential;
44 std::string oauth2_server_uri;
45 std::unordered_map<std::string, std::string> optional_oauth_params;
46 std::unordered_map<std::string, std::string> headers;
71 virtual std::optional<OAuth2SessionInfo>
OAuth2Info()
const {
return std::nullopt; }
86 std::unordered_map<std::string, std::string> headers);
108 const std::string& client_id,
const std::string& client_secret,
109 const std::string& scope,
bool keep_refreshed,
110 const std::unordered_map<std::string, std::string>& optional_oauth_params,
111 std::shared_ptr<HttpClient> client,
Executor* auth_executor =
nullptr);
Schedules iceberg-cpp tasks.
Definition executor.h:46
Definition expected.h:1199
An authentication session that can authenticate outgoing HTTP requests.
Definition auth_session.h:50
virtual Result< HttpRequest > Authenticate(HttpRequest request)=0
Authenticate an outgoing HTTP request.
static std::shared_ptr< AuthSession > MakeDefault(std::unordered_map< std::string, std::string > headers)
Create a session with static headers.
virtual std::optional< OAuth2SessionInfo > OAuth2Info() const
Return OAuth2 metadata when this is an OAuth2 session.
Definition auth_session.h:71
virtual Status Close()
Stop background refresh and release session resources.
Definition auth_session.h:75
static Result< std::shared_ptr< AuthSession > > MakeOAuth2(const OAuthTokenResponse &initial_token, const std::string &token_endpoint, const std::string &client_id, const std::string &client_secret, const std::string &scope, bool keep_refreshed, const std::unordered_map< std::string, std::string > &optional_oauth_params, std::shared_ptr< HttpClient > client, Executor *auth_executor=nullptr)
Create an OAuth2 session with automatic token refresh.
Define REST HTTP request types.
Define symbol visibility macros for the REST catalog library.
REST catalog authentication APIs.
Definition auth_manager.h:34
Define Result, Status, and error helpers.
An outgoing HTTP request. Mirrors Java's HttpRequest so signing implementations like SigV4 see method...
Definition http_request.h:89
Response from an OAuth2 token endpoint.
Definition types.h:318
OAuth2 metadata used to derive child authentication sessions.
Definition auth_session.h:39