-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Ported code from aws-sdk-go for buildingCanonicalHeaders
- Ported code from aws-sdk-go for proper query string handling - Refactored code to reduce methods - Added validations for tripper
- Loading branch information
Showing
6 changed files
with
299 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package sigv4 | ||
|
||
const ( | ||
awsServiceName = "aps" | ||
signingAlgorithm = "AWS4-HMAC-SHA256" | ||
|
||
authorizationHeaderKey = "Authorization" | ||
amzDateKey = "X-Amz-Date" | ||
|
||
// emptyStringSHA256 is the hex encoded sha256 value of an empty string | ||
emptyStringSHA256 = `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855` | ||
|
||
// timeFormat is the time format to be used in the X-Amz-Date header or query parameter | ||
timeFormat = "20060102T150405Z" | ||
|
||
// shortTimeFormat is the shorten time format used in the credential scope | ||
shortTimeFormat = "20060102" | ||
|
||
// contentSHAKey is the SHA256 of request body | ||
contentSHAKey = "X-Amz-Content-Sha256" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.