Class HttpExecuteEncryptionInterceptor
- java.lang.Object
-
- com.mastercard.developer.interceptors.HttpExecuteEncryptionInterceptor
-
- All Implemented Interfaces:
com.google.api.client.http.HttpExecuteInterceptor
,com.google.api.client.http.HttpResponseInterceptor
- Direct Known Subclasses:
HttpExecuteFieldLevelEncryptionInterceptor
,HttpExecuteJweInterceptor
public abstract class HttpExecuteEncryptionInterceptor extends Object implements com.google.api.client.http.HttpExecuteInterceptor, com.google.api.client.http.HttpResponseInterceptor
A Google Client API interceptor for encrypting/decrypting parts of HTTP payloads. See also: -HttpExecuteInterceptor
-HttpResponseInterceptor
-
-
Constructor Summary
Constructors Constructor Description HttpExecuteEncryptionInterceptor()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract String
decryptPayload(com.google.api.client.http.HttpHeaders headers, String responsePayload)
protected abstract String
encryptPayload(com.google.api.client.http.HttpHeaders headers, String requestPayload)
static HttpExecuteEncryptionInterceptor
from(EncryptionConfig config)
void
intercept(com.google.api.client.http.HttpRequest request)
void
interceptResponse(com.google.api.client.http.HttpResponse response)
-
-
-
Method Detail
-
encryptPayload
protected abstract String encryptPayload(com.google.api.client.http.HttpHeaders headers, String requestPayload) throws EncryptionException
- Throws:
EncryptionException
-
decryptPayload
protected abstract String decryptPayload(com.google.api.client.http.HttpHeaders headers, String responsePayload) throws EncryptionException
- Throws:
EncryptionException
-
from
public static HttpExecuteEncryptionInterceptor from(EncryptionConfig config)
-
intercept
public void intercept(com.google.api.client.http.HttpRequest request) throws IOException
- Specified by:
intercept
in interfacecom.google.api.client.http.HttpExecuteInterceptor
- Throws:
IOException
-
interceptResponse
public void interceptResponse(com.google.api.client.http.HttpResponse response) throws IOException
- Specified by:
interceptResponse
in interfacecom.google.api.client.http.HttpResponseInterceptor
- Throws:
IOException
-
-