Package com.emc.object.s3
Class S3Signer
- java.lang.Object
-
- com.emc.object.s3.S3Signer
-
- Direct Known Subclasses:
S3SignerV2
,S3SignerV4
public abstract class S3Signer extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.net.URL
generatePresignedUrl(PresignedUrlRequest request)
Generate presigned URL and then return the URLprotected abstract java.util.SortedMap<java.lang.String,java.lang.String>
getCanonicalizedHeaders(java.util.Map<java.lang.String,java.util.List<java.lang.Object>> headers, java.util.Map<java.lang.String,java.lang.String> parameters)
protected abstract java.lang.String
getDate(java.util.Map<java.lang.String,java.lang.String> parameters, java.util.Map<java.lang.String,java.util.List<java.lang.Object>> headers)
Get the date as Stringprotected abstract java.lang.String
getSignature(java.lang.String stringToSign, byte[] signingKey)
Get the signature as String, singingKey is only needed for v4 signerprotected static byte[]
hash256(java.lang.String stringToHash)
protected static java.lang.String
hexEncode(byte[] arg)
protected byte[]
hmac(java.lang.String algorithm, byte[] secretKey, java.lang.String message)
abstract void
sign(com.sun.jersey.api.client.ClientRequest request, java.lang.String resource, java.util.Map<java.lang.String,java.lang.String> parameters, java.util.Map<java.lang.String,java.util.List<java.lang.Object>> headers)
Sign the requestprotected java.lang.String
trimAndJoin(java.util.List<java.lang.Object> values, java.lang.String delimiter)
-
-
-
Field Detail
-
log
protected static final org.slf4j.Logger log
-
s3Config
protected S3Config s3Config
-
-
Method Detail
-
sign
public abstract void sign(com.sun.jersey.api.client.ClientRequest request, java.lang.String resource, java.util.Map<java.lang.String,java.lang.String> parameters, java.util.Map<java.lang.String,java.util.List<java.lang.Object>> headers)
Sign the request
-
getSignature
protected abstract java.lang.String getSignature(java.lang.String stringToSign, byte[] signingKey)
Get the signature as String, singingKey is only needed for v4 signer
-
getDate
protected abstract java.lang.String getDate(java.util.Map<java.lang.String,java.lang.String> parameters, java.util.Map<java.lang.String,java.util.List<java.lang.Object>> headers)
Get the date as String
-
generatePresignedUrl
public abstract java.net.URL generatePresignedUrl(PresignedUrlRequest request)
Generate presigned URL and then return the URL
-
getCanonicalizedHeaders
protected abstract java.util.SortedMap<java.lang.String,java.lang.String> getCanonicalizedHeaders(java.util.Map<java.lang.String,java.util.List<java.lang.Object>> headers, java.util.Map<java.lang.String,java.lang.String> parameters)
-
hmac
protected byte[] hmac(java.lang.String algorithm, byte[] secretKey, java.lang.String message)
-
hash256
protected static byte[] hash256(java.lang.String stringToHash)
-
hexEncode
protected static java.lang.String hexEncode(byte[] arg)
-
trimAndJoin
protected java.lang.String trimAndJoin(java.util.List<java.lang.Object> values, java.lang.String delimiter)
-
-