public class NeptuneRequestMetadataSigV4Signer extends NeptuneSigV4SignerBase<RequestMetadata>
RequestMetadatas.
Note that there are certain limitations for the usage of this class. In particular:
org.apache.http.client.utils.URIBuilder do)
using '+'.NeptuneSigV4SignerBase.NeptuneSigV4Signature| Constructor and Description |
|---|
NeptuneRequestMetadataSigV4Signer(String regionName,
com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider)
Create a V4 Signer for
RequestMetadata. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
attachSignature(RequestMetadata request,
NeptuneSigV4SignerBase.NeptuneSigV4Signature signature)
Takes a
RequestMetadata and updates the headers required for SigV4 auth. |
protected com.amazonaws.SignableRequest<?> |
toSignableRequest(RequestMetadata request)
Converts a
RequestMetadata to a signable metadata by adding signature headers for AWS SigV4 auth. |
checkNotNull, convertToSignableRequest, extractParametersFromQueryString, signRequestpublic NeptuneRequestMetadataSigV4Signer(String regionName, com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider) throws NeptuneSigV4SignerException
RequestMetadata.regionName - name of the region for which the request is signedawsCredentialsProvider - the provider offering access to the credentials used for signing the requestNeptuneSigV4SignerException - in case initialization failsprotected com.amazonaws.SignableRequest<?> toSignableRequest(RequestMetadata request) throws NeptuneSigV4SignerException
RequestMetadata to a signable metadata by adding signature headers for AWS SigV4 auth.toSignableRequest in class NeptuneSigV4SignerBase<RequestMetadata>request - the request metadata object.RequestMetadata.NeptuneSigV4SignerException - if there are issues while attempting to generate the signature.protected void attachSignature(RequestMetadata request, NeptuneSigV4SignerBase.NeptuneSigV4Signature signature) throws NeptuneSigV4SignerException
RequestMetadata and updates the headers required for SigV4 auth. These include the host header,
date header and the authorization header obtained from the NeptuneSigV4Signature.
Removes the host header if already present in the request.attachSignature in class NeptuneSigV4SignerBase<RequestMetadata>request - the request metadata.signature - the signature information to attachNeptuneSigV4SignerException - if there is an error in performing the update.