Class AuthInterceptor

  • All Implemented Interfaces:
    okhttp3.Interceptor

    
    public final class AuthInterceptor
     implements Interceptor
                        

    OkHttp Interceptor which deals with managing session information and attaching authentication headers.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public interface AuthInterceptor.Listener

      Interface definition for a callback to be invoked on authentication events.

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Unit setListener(AuthInterceptor.Listener listener) Associates event listener with current object.
      final Unit finish() Call to cleanup any running tasks before the object is GCed to avoid any leaks.
      Response intercept(Interceptor.Chain chain)
      final static String basicState(String username, String password) Returns compatible state representation for basic authorization
      final static Pair<String, String> decodeBasicState(String state) Returns a Pair from provided basic state Please try to avoid using this function if possible.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait