Documentation
¶
Overview ¶
Package auth provides AWS Signature V4 authentication utilities shared between s3 and s3db packages.
Index ¶
- Constants
- func CanonicalQueryString(queryParams map[string][]string) string
- func GenerateAuthHeaderReq(accessKey, secretKey, timestamp, region, service string, req *http.Request) error
- func GetSigningKey(secret, date, region, service string) []byte
- func HashSHA256(s string) string
- func HmacSHA256(key []byte, data string) []byte
- func HmacSHA256Hex(key []byte, data string) string
- func UriEncode(input string, encodeSlash bool) string
Constants ¶
View Source
const ( // TimeFormat is the full-width form to be used in the X-Amz-Date header. TimeFormat = "20060102T150405Z" // ShortTimeFormat is the shortened form used in credential scope. ShortTimeFormat = "20060102" )
Variables ¶
This section is empty.
Functions ¶
func CanonicalQueryString ¶
CanonicalQueryString creates the canonical query string according to AWS specs
func GenerateAuthHeaderReq ¶
func GenerateAuthHeaderReq(accessKey, secretKey, timestamp, region, service string, req *http.Request) error
GenerateAuthHeaderReq signs an HTTP request using AWS Signature V4
func GetSigningKey ¶
GetSigningKey derives the signing key for AWS Signature V4
func HashSHA256 ¶
HashSHA256 returns the hex-encoded SHA256 hash of the input
func HmacSHA256 ¶
HmacSHA256 returns the HMAC-SHA256 of data using the given key
func HmacSHA256Hex ¶
HmacSHA256Hex returns the hex-encoded HMAC-SHA256 of data using the given key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.