public class AWS4Signer extends AbstractAWSSigner implements ServiceAwareSigner, RegionAwareSigner, Presigner
Constructor and Description |
---|
AWS4Signer()
Construct a new AWS4 signer instance.
|
AWS4Signer(boolean doubleUrlEncoding)
Construct a new AWS4 signer instance.
|
Modifier and Type | Method and Description |
---|---|
void |
presignRequest(Request<?> request,
AWSCredentials credentials,
Date expiration)
Signs the request by adding the signature to the URL rather than as a
header.
|
void |
setRegionName(String regionName)
Sets the region name that this signer should use when calculating request
signatures.
|
void |
setServiceName(String serviceName)
Sets the service name that this signer should use when calculating
request signatures.
|
void |
sign(Request<?> request,
AWSCredentials credentials)
Sign the given request with the given set of credentials.
|
hash, hash, sign
public AWS4Signer()
public AWS4Signer(boolean doubleUrlEncoding)
doubleUrlEncoding
- Whether double url-encode the resource path when constructing
the canonical request.public void sign(Request<?> request, AWSCredentials credentials)
Signer
public void setServiceName(String serviceName)
setServiceName
in interface ServiceAwareSigner
serviceName
- The service name to use when calculating signatures in this
signer.public void setRegionName(String regionName)
setRegionName
in interface RegionAwareSigner
regionName
- The region name to use when calculating signatures in this
signer.public void presignRequest(Request<?> request, AWSCredentials credentials, Date expiration)
Presigner
presignRequest
in interface Presigner
request
- The request to sign.credentials
- The credentials to sign it with.expiration
- The time when this presigned URL will expire.Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.