public class Aws4Signer extends AbstractAwsSigner implements ServiceAwareSigner, RegionAwareSigner, Presigner
EMPTY_STRING_SHA256_HEX
Constructor and Description |
---|
Aws4Signer()
Construct a new AWS4 signer instance.
|
Aws4Signer(boolean doubleUrlEncoding)
Construct a new AWS4 signer instance.
|
Aws4Signer(SdkClock clock) |
Modifier and Type | Method and Description |
---|---|
String |
getRegionName()
Returns the region name that is used when calculating the signature.
|
String |
getServiceName()
Returns the service name that is used when calculating the signature.
|
SdkHttpFullRequest |
presign(Context.BeforeTransmission execution,
ExecutionAttributes executionAttributes,
Date userSpecifiedExpirationDate)
Signs the request by adding the signature to the URL rather than as a
header.
|
void |
setOverrideDate(Date overriddenDate)
Sets the date that overrides the signing date in the request.
|
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.
|
SdkHttpFullRequest |
sign(Context.BeforeTransmission execution,
ExecutionAttributes executionAttributes)
Sign the given request with the given set of credentials.
|
hash, hash, sign, signWithMac
public Aws4Signer()
public Aws4Signer(boolean doubleUrlEncoding)
doubleUrlEncoding
- Whether double url-encode the resource path when constructing
the canonical request.public Aws4Signer(SdkClock clock)
public void setOverrideDate(Date overriddenDate)
public String getRegionName()
public void setRegionName(String regionName)
setRegionName
in interface RegionAwareSigner
regionName
- The region name to use when calculating signatures in this
signer.public String getServiceName()
public void setServiceName(String serviceName)
setServiceName
in interface ServiceAwareSigner
serviceName
- The service name to use when calculating signatures in this
signer.public SdkHttpFullRequest sign(Context.BeforeTransmission execution, ExecutionAttributes executionAttributes)
Signer
public SdkHttpFullRequest presign(Context.BeforeTransmission execution, ExecutionAttributes executionAttributes, Date userSpecifiedExpirationDate)
Presigner
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.