Package org.jclouds.s3.filters
Class Aws4SignerForAuthorizationHeader
- java.lang.Object
-
- org.jclouds.s3.filters.Aws4SignerBase
-
- org.jclouds.s3.filters.Aws4SignerForAuthorizationHeader
-
public class Aws4SignerForAuthorizationHeader extends Aws4SignerBase
AWS4 signer sign requests to Amazon S3 using an 'Authorization' header.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jclouds.s3.filters.Aws4SignerBase
Aws4SignerBase.ServiceAndRegion
-
-
Field Summary
-
Fields inherited from class org.jclouds.s3.filters.Aws4SignerBase
creds, crypto, dateFormat, headerTag, serviceAndRegion, signatureWire, timestampFormat, timestampProvider
-
-
Constructor Summary
Constructors Constructor Description Aws4SignerForAuthorizationHeader(org.jclouds.http.internal.SignatureWire signatureWire, boolean isVhostStyle, String headerTag, com.google.common.base.Supplier<org.jclouds.domain.Credentials> creds, com.google.common.base.Supplier<Date> timestampProvider, Aws4SignerBase.ServiceAndRegion serviceAndRegion, org.jclouds.crypto.Crypto crypto)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringcalculatePayloadContentHash(org.jclouds.io.Payload payload)in this time, payload ContentMetadata provided content hash md5, but aws required sha256.protected StringgetEmptyPayloadContentHash()The hash returns the following value: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855protected StringgetPayloadHash(org.jclouds.http.HttpRequest request)protected org.jclouds.http.HttpRequestsign(org.jclouds.http.HttpRequest request)-
Methods inherited from class org.jclouds.s3.filters.Aws4SignerBase
appendAmzHeaders, createStringToSign, getCanonicalizedQueryString, getContentLength, getContentType, hash, hash, hash, hex, hmacSHA256, hmacSHA256, hostHeaderFor, lowerCaseNaturalOrderKeys, signatureKey, urlEncode
-
-
-
-
Constructor Detail
-
Aws4SignerForAuthorizationHeader
@Inject public Aws4SignerForAuthorizationHeader(org.jclouds.http.internal.SignatureWire signatureWire, @Named("jclouds.s3.virtual-host-buckets") boolean isVhostStyle, @Named("jclouds.aws.header.tag") String headerTag, com.google.common.base.Supplier<org.jclouds.domain.Credentials> creds, com.google.common.base.Supplier<Date> timestampProvider, Aws4SignerBase.ServiceAndRegion serviceAndRegion, org.jclouds.crypto.Crypto crypto)
-
-
Method Detail
-
sign
protected org.jclouds.http.HttpRequest sign(org.jclouds.http.HttpRequest request) throws org.jclouds.http.HttpException- Throws:
org.jclouds.http.HttpException
-
getPayloadHash
protected String getPayloadHash(org.jclouds.http.HttpRequest request)
-
getEmptyPayloadContentHash
protected String getEmptyPayloadContentHash()
The hash returns the following value: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
-
calculatePayloadContentHash
protected String calculatePayloadContentHash(org.jclouds.io.Payload payload)
in this time, payload ContentMetadata provided content hash md5, but aws required sha256.
-
-