24#include <unordered_map>
26#include "iceberg/catalog/rest/iceberg_rest_export.h"
28#include "iceberg/result.h"
33namespace iceberg::rest::auth {
53 virtual Status
Authenticate(std::unordered_map<std::string, std::string>& headers) = 0;
62 virtual Status
Close() {
return {}; }
72 static std::shared_ptr<AuthSession> MakeDefault(
73 std::unordered_map<std::string, std::string> headers);
89 static std::shared_ptr<AuthSession> MakeOAuth2(
const OAuthTokenResponse& initial_token,
90 const std::string& token_endpoint,
91 const std::string& client_id,
92 const std::string& client_secret,
93 const std::string& scope,
HTTP client for making requests to Iceberg REST Catalog API.
Definition http_client.h:71
An authentication session that can authenticate outgoing HTTP requests.
Definition auth_session.h:36
virtual Status Close()
Close the session and release any resources.
Definition auth_session.h:62
virtual Status Authenticate(std::unordered_map< std::string, std::string > &headers)=0
Authenticate the given request headers.
Response from an OAuth2 token endpoint.
Definition types.h:284