Class RefreshAuthTokenTransformingFuture<FROM,​TO>

  • Type Parameters:
    FROM - The type returned by the delegate Future.
    TO - The type to convert to.
    All Implemented Interfaces:
    Future<TO>

    public class RefreshAuthTokenTransformingFuture<FROM,​TO>
    extends Object
    implements Future<TO>
    Deprecated.
    in favor of RefreshAuthTokenWrapper – versions after 1.25.1 do not use RefreshAuthTokenTransformingFuture anymore
    Future that both delegates to another one and provides the ability to transform the response to another type.

    This is intended to work with some authenticated calls, like instance principals, and has handling so that if we receive a 401, we’ll refresh the auth token and then try again.

    This is to account for scenarios where we have a valid/non-expired token but the permissions for the instance have changed since the token was issued and so on the server-side the presented token is considered invalid.