Class ApacheHttpClient5EdgeGridInterceptor
java.lang.Object
com.akamai.edgegrid.signer.apachehttpclient5.ApacheHttpClient5EdgeGridInterceptor
- All Implemented Interfaces:
org.apache.hc.core5.http.HttpRequestInterceptor
public class ApacheHttpClient5EdgeGridInterceptor
extends Object
implements org.apache.hc.core5.http.HttpRequestInterceptor
Apache HTTP Client5 Library interceptor that signs a request using EdgeGrid V1 signing algorithm.
Signing is a process of adding an Authorization header with a request signature. If signing fails then
RuntimeException is thrown.-
Constructor Summary
ConstructorsConstructorDescriptionApacheHttpClient5EdgeGridInterceptor(ClientCredential credential) Creates an EdgeGrid signing interceptor using the sameClientCredentialfor each request.ApacheHttpClient5EdgeGridInterceptor(ClientCredentialProvider clientCredentialProvider) Creates an EdgeGrid signing interceptor selecting aClientCredentialviaClientCredentialProvider.getClientCredential(Request)for each request. -
Method Summary
Modifier and TypeMethodDescriptionvoidprocess(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.EntityDetails entityDetails, org.apache.hc.core5.http.protocol.HttpContext httpContext)
-
Constructor Details
-
ApacheHttpClient5EdgeGridInterceptor
Creates an EdgeGrid signing interceptor using the sameClientCredentialfor each request.- Parameters:
credential- aClientCredential
-
ApacheHttpClient5EdgeGridInterceptor
Creates an EdgeGrid signing interceptor selecting aClientCredentialviaClientCredentialProvider.getClientCredential(Request)for each request.- Parameters:
clientCredentialProvider- aClientCredentialProvider
-
-
Method Details
-
process
public void process(org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.EntityDetails entityDetails, org.apache.hc.core5.http.protocol.HttpContext httpContext) - Specified by:
processin interfaceorg.apache.hc.core5.http.HttpRequestInterceptor
-