Class OAuth2Interceptor

  • All Implemented Interfaces:
    okhttp3.Interceptor

    
    public final class OAuth2Interceptor
     implements Interceptor
                        

    This class implements a okhttp3.Interceptor which enables OAuth authentication.

    • Method Detail

      • getAuthenticatingCall

         final Call getAuthenticatingCall()

        Gets the Call that is currently being authenticated.

      • intercept

         Response intercept(Interceptor.Chain chain)
      • getQueuedCalls

         final Collection<Call> getQueuedCalls()

        Gets an unmodifiable collection containing all the Calls that are queued up for authentication. Note that the authentication flow will only be re-run for Calls in the collection if authentication fails for the Call currently being authenticated. Calls in the collection may be cancelled. Authentication will not be done for a queued Call that has been cancelled.

      • cloneSilent

         final OAuth2Interceptor cloneSilent()

        Generates a silent clone of the current interceptor. For 'silent' interceptor, when the refresh token expires, it will not bring up the WebView or CCT automatically to authenticate and refresh the token.