Class BearerAuthenticationInterceptor

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

public final class BearerAuthenticationInterceptor extends Object implements okhttp3.Interceptor
Provides Bearer authentication (also called token authentication) mechanism.
Since:
1.10.0
  • Constructor Details

    • BearerAuthenticationInterceptor

      public BearerAuthenticationInterceptor(String bearerPrefix, String bearerToken)
      Build a new instance.
      Parameters:
      bearerPrefix - The bearer prefix
      bearerToken - The bearer token
      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