Class AuthInterceptor

java.lang.Object
me.legrange.service.retrofit.auth.AuthInterceptor
All Implemented Interfaces:
okhttp3.Interceptor

public class AuthInterceptor
extends java.lang.Object
implements okhttp3.Interceptor
Author:
matt-vm
  • Nested Class Summary

    Nested classes/interfaces inherited from interface okhttp3.Interceptor

    okhttp3.Interceptor.Chain
  • Constructor Summary

    Constructors 
    Constructor Description
    AuthInterceptor​(java.lang.String token)
    Token based
    AuthInterceptor​(java.lang.String user, java.lang.String password)
    Basic auth
  • Method Summary

    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 Details

    • AuthInterceptor

      public AuthInterceptor​(java.lang.String token)
      Token based
      Parameters:
      token -
    • AuthInterceptor

      public AuthInterceptor​(java.lang.String user, java.lang.String password)
      Basic auth
      Parameters:
      user -
      password -
  • Method Details

    • intercept

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