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

OAuth2 authentication manager. More...

Inheritance diagram for iceberg::rest::auth::OAuth2Manager:
iceberg::rest::auth::AuthManager

Public Member Functions

Result< std::shared_ptr< AuthSession > > InitSession (HttpClient &init_client, const std::unordered_map< std::string, std::string > &properties) override
 Create a short-lived session used to contact the configuration endpoint.
 
Result< std::shared_ptr< AuthSession > > CatalogSession (HttpClient &client, const std::unordered_map< std::string, std::string > &properties) override
 Create the long-lived catalog session that acts as the parent session.
 
- Public Member Functions inherited from iceberg::rest::auth::AuthManager
virtual Result< std::shared_ptr< AuthSession > > ContextualSession (const std::unordered_map< std::string, std::string > &context, std::shared_ptr< AuthSession > parent)
 Create or reuse a session for a specific context.
 
virtual Result< std::shared_ptr< AuthSession > > TableSession (const TableIdentifier &table, const std::unordered_map< std::string, std::string > &properties, std::shared_ptr< AuthSession > parent)
 Create or reuse a session scoped to a single table/view.
 
virtual Status Close ()
 Release resources held by the manager.
 

Detailed Description

OAuth2 authentication manager.

Member Function Documentation

◆ CatalogSession()

Result< std::shared_ptr< AuthSession > > iceberg::rest::auth::OAuth2Manager::CatalogSession ( HttpClient shared_client,
const std::unordered_map< std::string, std::string > &  properties 
)
inlineoverridevirtual

Create the long-lived catalog session that acts as the parent session.

This session is used for all catalog-level operations (list namespaces, list tables, etc.) and serves as the parent session for contextual and table-specific sessions. It is owned by the catalog and reused throughout the catalog's lifetime.

Parameters
shared_clientHTTP client owned by the catalog and reused for auth calls.
propertiesCatalog properties (client config + server defaults).
Returns
Session for catalog operations or an error if authentication cannot be set up.

Implements iceberg::rest::auth::AuthManager.

◆ InitSession()

Result< std::shared_ptr< AuthSession > > iceberg::rest::auth::OAuth2Manager::InitSession ( HttpClient init_client,
const std::unordered_map< std::string, std::string > &  properties 
)
inlineoverridevirtual

Create a short-lived session used to contact the configuration endpoint.

This session is used only during catalog initialization to fetch server configuration and perform initial authentication. It is typically discarded after initialization.

Parameters
init_clientHTTP client used for initialization requests.
propertiesClient configuration supplied by the catalog.
Returns
Session for initialization or an error if credentials cannot be acquired.

Reimplemented from iceberg::rest::auth::AuthManager.


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