Class BasicAuthManager

java.lang.Object
org.apache.iceberg.rest.auth.BasicAuthManager
All Implemented Interfaces:
AutoCloseable, AuthManager

public final class BasicAuthManager extends Object implements AuthManager
An auth manager that adds static BASIC authentication data to outgoing HTTP requests.
  • Constructor Details

    • BasicAuthManager

      public BasicAuthManager(String ignored)
  • Method Details

    • catalogSession

      public AuthSession catalogSession(RESTClient sharedClient, Map<String,String> properties)
      Description copied from interface: AuthManager
      Returns a long-lived session whose lifetime is tied to the owning catalog. This session serves as the parent session for all other sessions (contextual and table-specific). It is closed when the owning catalog is closed.

      The provided REST client is a long-lived, shared client; if required, implementors may store it and reuse it for all subsequent requests to the authorization server, e.g. for renewing or refreshing credentials. It is not necessary to close it when AuthManager.close() is called.

      This method cannot return null.

      It is not required to cache the returned session internally, as the catalog will keep it alive for the lifetime of the catalog.

      Specified by:
      catalogSession in interface AuthManager
    • close

      public void close()
      Description copied from interface: AuthManager
      Closes the manager and releases any resources.

      This method is called when the owning catalog is closed.

      Specified by:
      close in interface AuthManager
      Specified by:
      close in interface AutoCloseable