Interface CloudHttp.Reauthenticator

Enclosing class:
CloudHttp

public static interface CloudHttp.Reauthenticator
What #retryOn401(CloudHttpTransport.Handler, Reauthenticator) does when a request is refused with 401: refresh the credentials, then send the same request again without another retry.
  • Method Summary

    Modifier and Type
    Method
    Description
    Starts refreshing the credentials.
    void
    Sends the original request again with the fresh credentials, to the original handler, without retrying a second time.
  • Method Details

    • refresh

      AsyncResource<?> refresh()

      Starts refreshing the credentials.

      Returns

      a resource that completes when fresh credentials are in place

    • resend

      void resend()
      Sends the original request again with the fresh credentials, to the original handler, without retrying a second time.