Class OkHttpEncryptionInterceptor
java.lang.Object
com.mastercard.developer.interceptors.OkHttpEncryptionInterceptor
- All Implemented Interfaces:
okhttp3.Interceptor
- Direct Known Subclasses:
OkHttpFieldLevelEncryptionInterceptor,OkHttpJweInterceptor
-
Nested Class Summary
Nested classes/interfaces inherited from interface okhttp3.Interceptor
okhttp3.Interceptor.Chain, okhttp3.Interceptor.Companion -
Field Summary
Fields inherited from interface okhttp3.Interceptor
Companion -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StringdecryptPayload(okhttp3.Response response, okhttp3.Response.Builder newBuilder, String responsePayload) protected abstract StringencryptPayload(okhttp3.Request request, okhttp3.Request.Builder newBuilder, String requestPayload) static OkHttpEncryptionInterceptorfrom(EncryptionConfig config) okhttp3.Responseintercept(okhttp3.Interceptor.Chain chain)
-
Constructor Details
-
OkHttpEncryptionInterceptor
public OkHttpEncryptionInterceptor()
-
-
Method Details
-
from
-
encryptPayload
protected abstract String encryptPayload(okhttp3.Request request, okhttp3.Request.Builder newBuilder, String requestPayload) throws EncryptionException - Throws:
EncryptionException
-
decryptPayload
protected abstract String decryptPayload(okhttp3.Response response, okhttp3.Response.Builder newBuilder, String responsePayload) throws EncryptionException - Throws:
EncryptionException
-
intercept
- Specified by:
interceptin interfaceokhttp3.Interceptor- Throws:
IOException
-