Package org.apache.iceberg.rest.auth
Interface AuthSession
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
DefaultAuthSession
- All Known Implementing Classes:
OAuth2Util.AuthSession
,RESTSigV4AuthSession
An authentication session that can be used to authenticate outgoing HTTP requests.
Authentication sessions are usually immutable, but may hold resources that need to be released
when the session is no longer needed. Implementations should override close()
to release
any resources.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionauthenticate
(HTTPRequest request) Authenticates the given request and returns a new request with the necessary authentication.void
close()
Closes the session and releases any resources.
-
Field Details
-
EMPTY
An empty session that does nothing.
-
-
Method Details
-
authenticate
Authenticates the given request and returns a new request with the necessary authentication. -
close
void close()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 interfaceAutoCloseable
-