26#include <unordered_map>
57 static std::unordered_map<std::string, std::string>
AuthHeaders(
58 const std::string& token);
75 const std::unordered_map<std::string, std::string>& extra_headers,
76 const std::string& subject_token,
const std::string& subject_token_type,
77 const std::optional<std::string>& actor_token,
78 const std::optional<std::string>& actor_token_type,
const std::string& scope,
79 const std::string& oauth2_server_uri,
80 const std::unordered_map<std::string, std::string>& optional_params);
93 const std::string& subject_token,
const std::string& subject_token_type,
94 const std::optional<std::string>& actor_token,
95 const std::optional<std::string>& actor_token_type,
const std::string& scope,
96 const std::unordered_map<std::string, std::string>& optional_params);
HTTP client for making requests to Iceberg REST Catalog API.
Definition http_client.h:71
Authentication properties.
Definition auth_properties.h:37
An authentication session that can authenticate outgoing HTTP requests.
Definition auth_session.h:48
OAuth2 token and authentication utilities.
Definition oauth2_util.h:39
static std::optional< int64_t > ExpiresAtMillis(std::string_view token)
Extract expiration time from a JWT token.
static Result< OAuthTokenResponse > FetchToken(HttpClient &client, AuthSession &session, const AuthProperties &properties)
Fetch an OAuth2 token using the client_credentials grant type.
static std::unordered_map< std::string, std::string > AuthHeaders(const std::string &token)
Build auth headers from a token string.
static Result< OAuthTokenResponse > ExchangeToken(HttpClient &client, AuthSession &session, const std::unordered_map< std::string, std::string > &extra_headers, const std::string &subject_token, const std::string &subject_token_type, const std::optional< std::string > &actor_token, const std::optional< std::string > &actor_token_type, const std::string &scope, const std::string &oauth2_server_uri, const std::unordered_map< std::string, std::string > &optional_params)
Exchange an OAuth2 token using the RFC 8693 grant type.
Define symbol visibility macros for the REST catalog library.
REST catalog authentication APIs.
Definition auth_manager.h:34
std::expected< T, E > Result
Result alias.
Definition result.h:88
Define Result, Status, and error helpers.