Interface AuthSession

All Known Implementing Classes:
AuthSessionImpl, AuthSessionOboCertImpl, AuthSessionOboImpl

@API(status=STABLE) public interface AuthSession
Authentication session handle. The refresh() will trigger a re-auth against the API endpoints.

You should keep using the same token until you receive a HTTP 401, at which you should re-authenticate and get a new token for a new session.

  • Method Details

    • getSessionToken

      @Nullable String getSessionToken()
      Pod's authentication token.
      Returns:
      the Pod session token
    • getAuthorizationToken

      @Nullable default String getAuthorizationToken() throws AuthUnauthorizedException
      Pod's Common JWT authentication token. When commonJwt.enabled is set to true in the configuration, an OAuth authentication scheme is used where the session token acts as the refresh token and the authorization token is a short lived access token.
      Returns:
      the Pod Authorization token
      Throws:
      AuthUnauthorizedException
    • getKeyManagerToken

      @Nullable String getKeyManagerToken()
      KeyManager's authentication token.
      Returns:
      the KeyManager token, null if OBO
    • refresh

      void refresh() throws AuthUnauthorizedException
      Trigger re-authentication to refresh tokens.
      Throws:
      AuthUnauthorizedException