Class OAuth2PasswordGrantAuthInterceptor

  • All Implemented Interfaces:
    okhttp3.Interceptor

    public class OAuth2PasswordGrantAuthInterceptor
    extends java.lang.Object
    implements okhttp3.Interceptor
    OkHttp interceptor that handles OAuth 2.0 Password Grant authentication. This interceptor automatically obtains and refreshes access tokens using the OAuth 2.0 password grant flow.
    See Also:
    OAuth 2.0 Password Grant
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface okhttp3.Interceptor

        okhttp3.Interceptor.Chain, okhttp3.Interceptor.Companion
    • Field Summary

      • Fields inherited from interface okhttp3.Interceptor

        Companion
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      okhttp3.Response intercept​(okhttp3.Interceptor.Chain chain)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OAuth2PasswordGrantAuthInterceptor

        public OAuth2PasswordGrantAuthInterceptor​(@Nonnull
                                                  okhttp3.OkHttpClient client,
                                                  @Nonnull
                                                  ListenerParameters parameters)
        Creates a new OAuth 2.0 Password Grant interceptor.
        Parameters:
        client - the HTTP client to use
        parameters - The listener parameters containing OAuth 2.0 and proxy configuration
      • OAuth2PasswordGrantAuthInterceptor

        public OAuth2PasswordGrantAuthInterceptor​(@Nonnull
                                                  ListenerParameters parameters)
        Creates a new OAuth 2.0 Password Grant interceptor.
        Parameters:
        parameters - The listener parameters containing OAuth 2.0 and proxy configuration
    • Method Detail

      • intercept

        @Nonnull
        public okhttp3.Response intercept​(@Nonnull
                                          okhttp3.Interceptor.Chain chain)
                                   throws java.io.IOException
        Specified by:
        intercept in interface okhttp3.Interceptor
        Throws:
        java.io.IOException