Package org.apache.iceberg.rest.auth
Interface DefaultAuthSession
- All Superinterfaces:
AuthSession
,AutoCloseable
Default implementation of
AuthSession
. It authenticates requests by setting the provided
headers on the request.
Most AuthManager
implementations should make use of this class, unless they need to
retain state when creating sessions, or if they need to modify the request in a different way.
-
Field Summary
Fields inherited from interface org.apache.iceberg.rest.auth.AuthSession
EMPTY
-
Method Summary
Modifier and TypeMethodDescriptiondefault HTTPRequest
authenticate
(HTTPRequest request) Authenticates the given request and returns a new request with the necessary authentication.default void
close()
Closes the session and releases any resources.headers()
Headers containing authentication data to set on the request.static DefaultAuthSession
of
(HTTPHeaders headers)
-
Method Details
-
headers
HTTPHeaders headers()Headers containing authentication data to set on the request. -
authenticate
Description copied from interface:AuthSession
Authenticates the given request and returns a new request with the necessary authentication.- Specified by:
authenticate
in interfaceAuthSession
-
close
default void close()Description copied from interface:AuthSession
Closes the session and releases any resources. This method is called when the session is no longer needed. Note that since sessions may be cached, this method may not be called immediately after the session is no longer needed, but rather when the session is evicted from the cache, or the cache itself is closed.- Specified by:
close
in interfaceAuthSession
- Specified by:
close
in interfaceAutoCloseable
-
of
-