public class AwsSigningConfig extends CrtResource
Modifier and Type | Class and Description |
---|---|
static class |
AwsSigningConfig.AwsSignatureType
What sort of signature should be computed from the signable?
|
static class |
AwsSigningConfig.AwsSignedBodyHeaderType
Controls if signing adds a header containing the canonical request's body value
|
class |
AwsSigningConfig.AwsSignedBodyValue
A set of string constants for various canonical request payload values.
|
static class |
AwsSigningConfig.AwsSigningAlgorithm
What version of the AWS signing process should we use.
|
CrtResource.ResourceInstance
Constructor and Description |
---|
AwsSigningConfig() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canReleaseReferencesImmediately()
Override that determines whether a resource releases its dependencies at the same time the native handle is released or if it waits.
|
AwsSigningConfig |
clone() |
AwsSigningConfig.AwsSigningAlgorithm |
getAlgorithm()
Gets what version of the AWS signing procecss will be used
|
Credentials |
getCredentials()
Gets the credentials to use for signing.
|
CredentialsProvider |
getCredentialsProvider()
Gets the provider to source credentials from before signing
|
long |
getExpirationInSeconds()
Gets the expiration time in seconds to use when signing to make a pre-signed url.
|
boolean |
getOmitSessionToken()
Gets whether or not X-Amz-Session-Token should be added to the canonical request when signing with session
credentials.
|
String |
getRegion()
Gets what will be used for the region or region-set concept during signing.
|
String |
getService()
Gets what service signing name will be used
|
boolean |
getShouldNormalizeUriPath()
Gets whether or not the uri path should be normalized during canonical request construction
|
java.util.function.Predicate<String> |
getShouldSignHeader()
Gets the header-name signing predicate filter to use
|
AwsSigningConfig.AwsSignatureType |
getSignatureType()
Gets what kind of signature will be computed
|
AwsSigningConfig.AwsSignedBodyHeaderType |
getSignedBodyHeader()
Gets what signed body header should hold the payload hash (or override value).
|
String |
getSignedBodyValue()
Gets the payload hash override to use in canonical request construction.
|
long |
getTime()
Gets the point in time (in milliseconds since epoch) that signing will be done relative to
|
boolean |
getUseDoubleUriEncode()
Gets whether or not signing will uri encode urls during canonical request construction
|
protected void |
releaseNativeHandle()
Required override method that must begin the release process of the acquired native handle
|
void |
setAlgorithm(AwsSigningConfig.AwsSigningAlgorithm algorithm)
Sets what version of the AWS signing process should be used
|
void |
setCredentials(Credentials credentials)
Sets the credentials to use for signing.
|
void |
setCredentialsProvider(CredentialsProvider credentialsProvider)
Sets the provider to use to source credentials from before signing.
|
void |
setExpirationInSeconds(long expirationInSeconds)
Sets the expiration time in seconds when using query param signing (pre-signed url).
|
void |
setOmitSessionToken(boolean omitSessionToken)
Sets whether or not X-Amz-Session-Token should be added to the canonical request when signing with session
credentials.
|
void |
setRegion(String region)
Sets what to use for region when signing.
|
void |
setService(String service)
Sets what service signing name to use.
|
void |
setShouldNormalizeUriPath(boolean shouldNormalizeUriPath)
Sets whether or not the uri path should be normalized during canonical request construction
|
void |
setShouldSignHeader(java.util.function.Predicate<String> shouldSignHeader)
Sets a header-name signing predicate filter.
|
void |
setSignatureType(AwsSigningConfig.AwsSignatureType signatureType)
Sets what sort of signature should be computed
|
void |
setSignedBodyHeader(AwsSigningConfig.AwsSignedBodyHeaderType signedBodyHeader)
Sets what signed body header should hold the payload hash (or override value).
|
void |
setSignedBodyValue(String signedBodyValue)
Sets the payload hash override value to use in canonical request construction.
|
void |
setTime(long time)
Sets the point in time that signing should be relative to.
|
void |
setUseDoubleUriEncode(boolean useDoubleUriEncode)
Sets whether or not signing should uri encode urls as part of canonical request construction.
|
acquireNativeHandle, addRef, addReferenceTo, close, collectNativeResource, collectNativeResources, decRef, getNativeHandle, getResourceLogDescription, isNull, logNativeResources, releaseReferences, removeReferenceTo, setDescription, swapReferenceTo, waitForNoResources
public AwsSigningConfig clone()
protected void releaseNativeHandle()
releaseNativeHandle
in class CrtResource
protected boolean canReleaseReferencesImmediately()
canReleaseReferencesImmediately
in class CrtResource
public void setAlgorithm(AwsSigningConfig.AwsSigningAlgorithm algorithm)
algorithm
- desired version of the AWS signing processpublic AwsSigningConfig.AwsSigningAlgorithm getAlgorithm()
public void setSignatureType(AwsSigningConfig.AwsSignatureType signatureType)
signatureType
- what kind of signature to computepublic AwsSigningConfig.AwsSignatureType getSignatureType()
public void setRegion(String region)
region
- region value to use when signingpublic String getRegion()
public void setService(String service)
service
- signing name of the service that this signing calculation should usepublic String getService()
public void setTime(long time)
time
- point in time, as milliseconds since epoch, that signing should be relative topublic long getTime()
public void setCredentialsProvider(CredentialsProvider credentialsProvider)
credentialsProvider
- provider to retrieve credentials from prior to signingpublic CredentialsProvider getCredentialsProvider()
public void setCredentials(Credentials credentials)
credentials
- credentials to use for signingpublic Credentials getCredentials()
public void setShouldSignHeader(java.util.function.Predicate<String> shouldSignHeader)
shouldSignHeader
- header-name signing predicate filterpublic java.util.function.Predicate<String> getShouldSignHeader()
public void setUseDoubleUriEncode(boolean useDoubleUriEncode)
useDoubleUriEncode
- should signing uri encode urls in the canonical requestpublic boolean getUseDoubleUriEncode()
public void setShouldNormalizeUriPath(boolean shouldNormalizeUriPath)
shouldNormalizeUriPath
- whether or not the uri path should be normalized during canonical request constructionpublic boolean getShouldNormalizeUriPath()
public void setOmitSessionToken(boolean omitSessionToken)
omitSessionToken
- whether or not X-Amz-Session-Token should be added to the canonical request when signing with session
credentialspublic boolean getOmitSessionToken()
public void setSignedBodyValue(String signedBodyValue)
signedBodyValue
- payload hash override value to use in canonical request constructionpublic String getSignedBodyValue()
public void setSignedBodyHeader(AwsSigningConfig.AwsSignedBodyHeaderType signedBodyHeader)
signedBodyHeader
- what signed body header should hold the payload hash (or override value)public AwsSigningConfig.AwsSignedBodyHeaderType getSignedBodyHeader()
public void setExpirationInSeconds(long expirationInSeconds)
expirationInSeconds
- time in seconds that a pre-signed url will be valid forpublic long getExpirationInSeconds()
Copyright © 2021. All rights reserved.