Class ApiKeyAuthenticationInterceptor
java.lang.Object
dev.voidframework.restclient.retrofit.interceptor.ApiKeyAuthenticationInterceptor
- All Implemented Interfaces:
okhttp3.Interceptor
Provides API key authentication mechanism.
- Since:
- 1.10.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAvailable locations where to add API key.Nested classes/interfaces inherited from interface okhttp3.Interceptor
okhttp3.Interceptor.Chain -
Constructor Summary
ConstructorsConstructorDescriptionApiKeyAuthenticationInterceptor(String key, String value, ApiKeyAuthenticationInterceptor.AddTo addTo) Build a new instance. -
Method Summary
-
Constructor Details
-
ApiKeyAuthenticationInterceptor
public ApiKeyAuthenticationInterceptor(String key, String value, ApiKeyAuthenticationInterceptor.AddTo addTo) Build a new instance.- Parameters:
key- The API key variable namevalue- The API key valueaddTo- Where to add the API key (ie: HEADERS)- Since:
- 1.10.0
-
-
Method Details
-
intercept
- Specified by:
interceptin interfaceokhttp3.Interceptor- Throws:
IOException
-