|
iceberg-cpp
|
OAuth2 token utilities for REST catalog authentication. More...
#include <string>#include <string_view>#include <unordered_map>#include "iceberg/catalog/rest/iceberg_rest_export.h"#include "iceberg/catalog/rest/type_fwd.h"#include "iceberg/catalog/rest/types.h"#include "iceberg/result.h"Go to the source code of this file.
Functions | |
| Result< OAuthTokenResponse > | iceberg::rest::auth::FetchToken (HttpClient &client, AuthSession &session, const AuthProperties &properties) |
| Fetch an OAuth2 token using the client_credentials grant type. | |
| std::unordered_map< std::string, std::string > | iceberg::rest::auth::AuthHeaders (const std::string &token) |
| Build auth headers from a token string. | |
Variables | |
| constexpr std::string_view | iceberg::rest::auth::kAuthorizationHeader = "Authorization" |
| constexpr std::string_view | iceberg::rest::auth::kBearerPrefix = "Bearer " |
OAuth2 token utilities for REST catalog authentication.
| ICEBERG_REST_EXPORT std::unordered_map< std::string, std::string > iceberg::rest::auth::AuthHeaders | ( | const std::string & | token | ) |
Build auth headers from a token string.
| token | Bearer token string (may be empty). |
| ICEBERG_REST_EXPORT Result< OAuthTokenResponse > iceberg::rest::auth::FetchToken | ( | HttpClient & | client, |
| AuthSession & | session, | ||
| const AuthProperties & | properties | ||
| ) |
Fetch an OAuth2 token using the client_credentials grant type.
| client | HTTP client to use for the request. |
| session | Auth session for the request headers. |
| properties | Auth configuration containing credential, scope, token endpoint, and optional OAuth params. |