public class AWSS3V4Signer extends AWS4Signer
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
CONTENT_SHA_256 |
private static java.lang.String |
UNSIGNED_PAYLOAD
Sent to S3 in lieu of a payload hash when unsigned payloads are enabled
|
doubleUrlEncode, log, overriddenDate, regionName, serviceName
EMPTY_STRING_SHA256_HEX
Constructor and Description |
---|
AWSS3V4Signer()
Don't double-url-encode path elements; S3 expects path elements to be encoded only once in
the canonical URI.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
calculateContentHash(SignableRequest<?> request)
Returns the pre-defined header value and set other necessary headers if
the request needs to be chunk-encoded.
|
protected java.lang.String |
calculateContentHashPresign(SignableRequest<?> request)
Calculate the hash of the request's payload.
|
(package private) static long |
getContentLength(SignableRequest<?> request)
Read the content of the request to get the length of the stream.
|
private boolean |
isChunkedEncodingDisabled(SignableRequest<?> signableRequest) |
private boolean |
isPayloadSigningEnabled(SignableRequest<?> signableRequest) |
protected void |
processRequestPayload(SignableRequest<?> request,
byte[] signature,
byte[] signingKey,
AWS4SignerRequestParams signerRequestParams)
If necessary, creates a chunk-encoding wrapper on the request payload.
|
private boolean |
useChunkEncoding(SignableRequest<?> request)
Determine whether to use aws-chunked for signing
|
addHostHeader, addSessionCredentials, computeSignature, createCanonicalRequest, createStringToSign, getCanonicalizedHeaderString, getOverriddenDate, getRegionName, getServiceName, getSignedHeadersString, presignRequest, setRegionName, setServiceName, shouldExcludeHeaderFromSigning, sign
getBinaryRequestPayload, getBinaryRequestPayloadStream, getBinaryRequestPayloadStreamWithoutQueryParams, getBinaryRequestPayloadWithoutQueryParams, getCanonicalizedEndpoint, getCanonicalizedQueryString, getCanonicalizedQueryString, getCanonicalizedResourcePath, getCanonicalizedResourcePath, getRequestPayload, getRequestPayloadWithoutQueryParams, getSignatureDate, getTimeOffset, hash, hash, hash, newString, sanitizeCredentials, sign, sign, signAndBase64Encode, signAndBase64Encode, signWithMac
private static final java.lang.String CONTENT_SHA_256
private static final java.lang.String UNSIGNED_PAYLOAD
public AWSS3V4Signer()
protected void processRequestPayload(SignableRequest<?> request, byte[] signature, byte[] signingKey, AWS4SignerRequestParams signerRequestParams)
processRequestPayload
in class AWS4Signer
protected java.lang.String calculateContentHashPresign(SignableRequest<?> request)
AWS4Signer
calculateContentHashPresign
in class AWS4Signer
protected java.lang.String calculateContentHash(SignableRequest<?> request)
calculateContentHash
in class AWS4Signer
private boolean useChunkEncoding(SignableRequest<?> request)
private boolean isChunkedEncodingDisabled(SignableRequest<?> signableRequest)
private boolean isPayloadSigningEnabled(SignableRequest<?> signableRequest)
static long getContentLength(SignableRequest<?> request) throws java.io.IOException
java.io.IOException