Interface DefaultAuthSession

All Superinterfaces:
AuthSession, AutoCloseable

@Immutable public interface DefaultAuthSession extends AuthSession
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 Type
    Method
    Description
    default HTTPRequest
    Authenticates the given request and returns a new request with the necessary authentication.
    default void
    Closes the session and releases any resources.
    Headers containing authentication data to set on the request.
    of(HTTPHeaders headers)
     
  • Method Details

    • headers

      HTTPHeaders headers()
      Headers containing authentication data to set on the request.
    • authenticate

      default HTTPRequest authenticate(HTTPRequest request)
      Description copied from interface: AuthSession
      Authenticates the given request and returns a new request with the necessary authentication.
      Specified by:
      authenticate in interface AuthSession
    • 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 interface AuthSession
      Specified by:
      close in interface AutoCloseable
    • of

      static DefaultAuthSession of(HTTPHeaders headers)