Package org.apache.iceberg.rest.auth
Class BasicAuthManager
java.lang.Object
org.apache.iceberg.rest.auth.BasicAuthManager
- All Implemented Interfaces:
AutoCloseable
,AuthManager
An auth manager that adds static BASIC authentication data to outgoing HTTP requests.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncatalogSession
(RESTClient sharedClient, Map<String, String> properties) Returns a long-lived session whose lifetime is tied to the owning catalog.void
close()
Closes the manager and releases any resources.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.iceberg.rest.auth.AuthManager
contextualSession, initSession, tableSession
-
Constructor Details
-
BasicAuthManager
-
-
Method Details
-
catalogSession
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 interfaceAuthManager
-
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 interfaceAuthManager
- Specified by:
close
in interfaceAutoCloseable
-