Class BasicAuthenticationInterceptor

java.lang.Object
dev.voidframework.restclient.retrofit.interceptor.BasicAuthenticationInterceptor
All Implemented Interfaces:
okhttp3.Interceptor

public final class BasicAuthenticationInterceptor extends Object implements okhttp3.Interceptor
Provides Basic authentication mechanism.
Since:
1.10.0
  • Constructor Details

    • BasicAuthenticationInterceptor

      public BasicAuthenticationInterceptor(String username, String password, boolean useIso88591Encoding)
      Build a new instance.
      Parameters:
      username - The username
      password - The password
      useIso88591Encoding - Use ISO-8859-1 encoding rather than UTF-8
      Since:
      1.10.0
  • Method Details

    • intercept

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