Interface DelegationTokenProvider

  • All Known Implementing Classes:
    EmptyTokenProviderImpl, JwtTokenProviderImpl, StringTokenProviderImpl

    public interface DelegationTokenProvider
    A client-side proxy for obtaining a delegation token from the server. Note: Delegation tokens are used by Segment Store services to authorize requests. They are created by Controller at client's behest.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean populateToken​(java.lang.String token)
      Populates the object with the specified delegation token.
      java.util.concurrent.CompletableFuture<java.lang.String> retrieveToken()
      Retrieve delegation token.
      void signalTokenExpired()
      Signals the object that the token it may be holding has expired.
    • Method Detail

      • retrieveToken

        java.util.concurrent.CompletableFuture<java.lang.String> retrieveToken()
        Retrieve delegation token.
        Returns:
        a CompletableFuture that, when completed, will return the retrieved delegation token
      • populateToken

        boolean populateToken​(java.lang.String token)
        Populates the object with the specified delegation token.
        Parameters:
        token - the token to populate the object with
        Returns:
        whether the population was successful
      • signalTokenExpired

        void signalTokenExpired()
        Signals the object that the token it may be holding has expired.