public class AwsUtils extends Object
Constructor and Description |
---|
AwsUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
getCanonicalizedAmzHeaders(Series<Header> requestHeaders)
Returns the canonicalized AMZ headers.
|
static String |
getCanonicalizedResourceName(Reference reference)
Returns the canonicalized resource name.
|
static String |
getHmacSha1Signature(String stringToSign,
char[] secret)
Returns the AWS authentication compatible signature for the given string
to sign and secret.
|
static String |
getHmacSha256Signature(String stringToSign,
char[] secret)
Returns the AWS authentication compatible signature for the given string
to sign and secret.
|
static String |
getQuerySignature(Method method,
Reference resourceRef,
List<Parameter> params,
char[] secret)
Returns the AWS SimpleDB authentication compatible signature for the
given request and secret.
|
static String |
getQueryStringToSign(Method method,
Reference resourceRef,
List<Parameter> params)
Returns the SimpleDB string to sign.
|
static String |
getS3Signature(Request request,
char[] secret)
Returns the AWS S3 authentication compatible signature for the given
request and secret.
|
static String |
getS3Signature(Request request,
Series<Header> headers,
char[] secret)
Returns the AWS S3 authentication compatible signature for the given
request and secret.
|
static String |
getS3StringToSign(Request request)
Returns the string to sign.
|
static String |
getS3StringToSign(Request request,
Series<Header> headers)
Returns the S3 string to sign.
|
public static String getCanonicalizedAmzHeaders(Series<Header> requestHeaders)
requestHeaders
- The list of request headers.public static String getCanonicalizedResourceName(Reference reference)
reference
- The resource referencepublic static String getHmacSha1Signature(String stringToSign, char[] secret)
stringToSign
- The string to sign.secret
- The user secret to sign withpublic static String getHmacSha256Signature(String stringToSign, char[] secret)
stringToSign
- The string to sign.secret
- The user secret to sign withpublic static String getQuerySignature(Method method, Reference resourceRef, List<Parameter> params, char[] secret)
method
- The request method.resourceRef
- The target resource reference.params
- The request parameters.secret
- The user secret to sign withpublic static String getQueryStringToSign(Method method, Reference resourceRef, List<Parameter> params)
resourceRef
- The target resource reference.public static String getS3Signature(Request request, char[] secret)
request
- The request to create the signature forsecret
- The user secret to sign withpublic static String getS3Signature(Request request, Series<Header> headers, char[] secret)
request
- The request to create the signature forheaders
- The HTTP headers associated with the requestsecret
- The user secret to sign withpublic static String getS3StringToSign(Request request)
request
- The request to generate the signature string fromCopyright © 2005–2013. All rights reserved.