Class OkHttp2EncryptionInterceptor
- java.lang.Object
-
- com.mastercard.developer.interceptors.OkHttp2EncryptionInterceptor
-
- All Implemented Interfaces:
com.squareup.okhttp.Interceptor
- Direct Known Subclasses:
OkHttp2FieldLevelEncryptionInterceptor,OkHttp2JweInterceptor
public abstract class OkHttp2EncryptionInterceptor extends Object implements com.squareup.okhttp.Interceptor
-
-
Constructor Summary
Constructors Constructor Description OkHttp2EncryptionInterceptor()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract StringdecryptPayload(com.squareup.okhttp.Response response, com.squareup.okhttp.Response.Builder newBuilder, String responsePayload)protected abstract StringencryptPayload(com.squareup.okhttp.Request request, com.squareup.okhttp.Request.Builder newBuilder, String requestPayload)static OkHttp2EncryptionInterceptorfrom(EncryptionConfig config)com.squareup.okhttp.Responseintercept(com.squareup.okhttp.Interceptor.Chain chain)
-
-
-
Method Detail
-
encryptPayload
protected abstract String encryptPayload(com.squareup.okhttp.Request request, com.squareup.okhttp.Request.Builder newBuilder, String requestPayload) throws EncryptionException
- Throws:
EncryptionException
-
decryptPayload
protected abstract String decryptPayload(com.squareup.okhttp.Response response, com.squareup.okhttp.Response.Builder newBuilder, String responsePayload) throws EncryptionException
- Throws:
EncryptionException
-
from
public static OkHttp2EncryptionInterceptor from(EncryptionConfig config)
-
intercept
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException- Specified by:
interceptin interfacecom.squareup.okhttp.Interceptor- Throws:
IOException
-
-