Class BearerAuthenticationInterceptor
java.lang.Object
dev.voidframework.restclient.retrofit.interceptor.BearerAuthenticationInterceptor
- All Implemented Interfaces:
okhttp3.Interceptor
Provides Bearer authentication (also called token authentication) mechanism.
- Since:
- 1.10.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface okhttp3.Interceptor
okhttp3.Interceptor.Chain -
Constructor Summary
ConstructorsConstructorDescriptionBearerAuthenticationInterceptor(String bearerPrefix, String bearerToken) Build a new instance. -
Method Summary
-
Constructor Details
-
BearerAuthenticationInterceptor
Build a new instance.- Parameters:
bearerPrefix- The bearer prefixbearerToken- The bearer token- Since:
- 1.10.0
-
-
Method Details
-
intercept
- Specified by:
interceptin interfaceokhttp3.Interceptor- Throws:
IOException
-