public class AWS4SignerForAuthorizationHeader extends AWS4SignerBase
ALGORITHM, dateStampFormat, DateStringFormat, dateTimeFormat, EMPTY_BODY_SHA256, endpointUrl, httpMethod, ISO8601BasicFormat, regionName, SCHEME, serviceName, TERMINATOR, UNSIGNED_PAYLOAD
Constructor and Description |
---|
AWS4SignerForAuthorizationHeader(URL endpointUrl,
String httpMethod,
String serviceName,
String regionName) |
Modifier and Type | Method and Description |
---|---|
String |
computeSignature(Map<String,String> headers,
Map<String,String> queryParameters,
String bodyHash,
String awsAccessKey,
String awsSecretKey)
Computes an AWS4 signature for a request, ready for inclusion as an
'Authorization' header.
|
getCanonicalizedHeaderString, getCanonicalizedQueryString, getCanonicalizedResourcePath, getCanonicalizeHeaderNames, getCanonicalRequest, getStringToSign, hash, hash, sign, urlEncode
public String computeSignature(Map<String,String> headers, Map<String,String> queryParameters, String bodyHash, String awsAccessKey, String awsSecretKey)
headers
- The request headers; 'Host' and 'X-Amz-Date' will be added to
this set.queryParameters
- Any query parameters that will be added to the endpoint. The
parameters should be specified in canonical format.bodyHash
- Precomputed SHA256 hash of the request body content; this
value should also be set as the header 'X-Amz-Content-SHA256'
for non-streaming uploads.awsAccessKey
- The user's AWS Access Key.awsSecretKey
- The user's AWS Secret Key.Copyright © 2018 JBoss by Red Hat. All rights reserved.