Class V4CanonicalRequest
https://docs.aws.amazon.com/IAM/latest/UserGuide/create-signed-request.html#create-canonical-request
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A class for representing options used when creating aV4CanonicalRequest
-
Constructor Summary
ConstructorDescriptionV4CanonicalRequest
(SdkHttpRequest request, String contentHash, V4CanonicalRequest.Options options) Create a canonical request. -
Method Summary
Modifier and TypeMethodDescriptiongetCanonicalHeaders
(Map<String, List<String>> headers) Get the list of headers that are to be signed.getCanonicalHeaders
(SdkHttpRequest request) Get the list of headers that are to be signed.static String
Get the string representing the headers that will be signed and their values.Get the canonical request string.Get the string representing which headers are part of the signing process.static String
Get the string representing which headers are part of the signing process.
-
Constructor Details
-
V4CanonicalRequest
public V4CanonicalRequest(SdkHttpRequest request, String contentHash, V4CanonicalRequest.Options options) Create a canonical request.Each parameter of a canonical request is set upon creation of this object.
To get such a parameter (i.e. the canonical request string), simply call the getter for that parameter (i.e. getCanonicalRequestString())
-
-
Method Details
-
getSignedHeadersString
Get the string representing which headers are part of the signing process. Header names are separated by a semicolon. -
getCanonicalRequestString
Get the canonical request string. -
getCanonicalHeaders
Get the list of headers that are to be signed.If calling from a site with the request object handy, this method should be used instead of passing the headers themselves, as doing so creates a redundant copy.
-
getCanonicalHeaders
Get the list of headers that are to be signed. The supplied map of headers is expected to be sorted case-insensitively. -
getCanonicalHeadersString
Get the string representing the headers that will be signed and their values. The input list is expected to be sorted case-insensitively.The output string will have header names as lower-case, sorted in alphabetical order, and followed by a colon.
Values are trimmed of any leading/trailing spaces, sequential spaces are converted to single space, and multiple values are comma separated.
Each header-value pair is separated by a newline.
-
getSignedHeadersString
Get the string representing which headers are part of the signing process. Header names are separated by a semicolon.
-