Class OkHttpFieldLevelEncryptionInterceptor
- java.lang.Object
-
- com.mastercard.developer.interceptors.OkHttpEncryptionInterceptor
-
- com.mastercard.developer.interceptors.OkHttpFieldLevelEncryptionInterceptor
-
- All Implemented Interfaces:
okhttp3.Interceptor
public class OkHttpFieldLevelEncryptionInterceptor extends OkHttpEncryptionInterceptor
An OkHttp3 interceptor for encrypting/decrypting parts of HTTP payloads. See: https://github.com/square/okhttp/wiki/Interceptors
-
-
Constructor Summary
Constructors Constructor Description OkHttpFieldLevelEncryptionInterceptor(EncryptionConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
decryptPayload(okhttp3.Response response, okhttp3.Response.Builder responseBuilder, String responsePayload)
protected String
encryptPayload(okhttp3.Request request, okhttp3.Request.Builder requestBuilder, String requestPayload)
-
Methods inherited from class com.mastercard.developer.interceptors.OkHttpEncryptionInterceptor
from, intercept
-
-
-
-
Constructor Detail
-
OkHttpFieldLevelEncryptionInterceptor
public OkHttpFieldLevelEncryptionInterceptor(EncryptionConfig config)
-
-
Method Detail
-
encryptPayload
protected String encryptPayload(okhttp3.Request request, okhttp3.Request.Builder requestBuilder, String requestPayload) throws EncryptionException
- Specified by:
encryptPayload
in classOkHttpEncryptionInterceptor
- Throws:
EncryptionException
-
decryptPayload
protected String decryptPayload(okhttp3.Response response, okhttp3.Response.Builder responseBuilder, String responsePayload) throws EncryptionException
- Specified by:
decryptPayload
in classOkHttpEncryptionInterceptor
- Throws:
EncryptionException
-
-