iceberg-cpp
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
iceberg::rest::auth::AuthProperties Class Reference

Authentication properties. More...

#include <auth_properties.h>

Inheritance diagram for iceberg::rest::auth::AuthProperties:
iceberg::ConfigBase< AuthProperties >

Public Types

template<typename T >
using Entry = const ConfigBase< AuthProperties >::Entry< T >
 

Public Member Functions

std::string token () const
 Get the bearer token.
 
std::string credential () const
 Get the raw credential string.
 
std::string scope () const
 Get the OAuth2 scope.
 
std::string oauth2_server_uri () const
 Get the token endpoint URI.
 
bool keep_refreshed () const
 Whether token refresh is enabled.
 
bool exchange_enabled () const
 Whether token exchange is enabled.
 
const std::string & client_id () const
 Parsed client_id from credential (empty if no colon).
 
const std::string & client_secret () const
 Parsed client_secret from credential.
 
std::unordered_map< std::string, std::string > optional_oauth_params () const
 Build optional OAuth params (audience, resource) from config.
 
- Public Member Functions inherited from iceberg::ConfigBase< AuthProperties >
ConfigBaseSet (const Entry< T > &entry, const T &val)
 
ConfigBaseUnset (const Entry< T > &entry)
 
ConfigBaseReset ()
 
Get (const Entry< T > &entry) const
 
const std::unordered_map< std::string, std::string > & configs () const
 
std::unordered_map< std::string, std::string > & mutable_configs ()
 
std::unordered_map< std::string, std::string > Extract (std::string_view prefix) const
 Extracts the prefix from the configuration.
 

Static Public Member Functions

static Result< AuthPropertiesFromProperties (const std::unordered_map< std::string, std::string > &properties)
 Build an AuthProperties from a properties map.
 

Static Public Attributes

static const std::string kAuthType = "rest.auth.type"
 
static const std::string kAuthTypeNone = "none"
 
static const std::string kAuthTypeBasic = "basic"
 
static const std::string kAuthTypeOAuth2 = "oauth2"
 
static const std::string kAuthTypeSigV4 = "sigv4"
 
static const std::string kBasicUsername = "rest.auth.basic.username"
 
static const std::string kBasicPassword = "rest.auth.basic.password"
 
static const std::string kSigV4Region = "rest.auth.sigv4.region"
 
static const std::string kSigV4Service = "rest.auth.sigv4.service"
 
static const std::string kSigV4DelegateAuthType
 
static Entry< std::string > kToken {"token", ""}
 
static Entry< std::string > kCredential {"credential", ""}
 
static Entry< std::string > kScope {"scope", "catalog"}
 
static Entry< std::string > kOAuth2ServerUri
 
static Entry< bool > kKeepRefreshed {"token-refresh-enabled", true}
 
static Entry< bool > kExchangeEnabled {"token-exchange-enabled", true}
 
static Entry< std::string > kAudience {"audience", ""}
 
static Entry< std::string > kResource {"resource", ""}
 

Additional Inherited Members

- Protected Attributes inherited from iceberg::ConfigBase< AuthProperties >
std::unordered_map< std::string, std::string > configs_
 

Detailed Description

Authentication properties.

Member Data Documentation

◆ kOAuth2ServerUri

Entry<std::string> iceberg::rest::auth::AuthProperties::kOAuth2ServerUri
inlinestatic
Initial value:
{"oauth2-server-uri",
"v1/oauth/tokens"}

◆ kSigV4DelegateAuthType

const std::string iceberg::rest::auth::AuthProperties::kSigV4DelegateAuthType
inlinestatic
Initial value:
=
"rest.auth.sigv4.delegate-auth-type"

The documentation for this class was generated from the following files: