Documentation ¶
Overview ¶
Package signature verify request for any AWS service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TimeNow is a variable that holds the function to get the current time TimeNow = time.Now )
Functions ¶
func EncodeAPIErrorToResponse ¶
EncodeAPIErrorToResponse encodes APIerror to http response
func EncodeResponse ¶
func EncodeResponse(response interface{}) []byte
EncodeResponse encodes the response headers into XML format.
func ReloadKeys ¶
Types ¶
type APIError ¶
APIError is API Error structure
func GetAPIError ¶
GetAPIError decodes Signerror[int] to APIerror[encodable]
type Credentials ¶
type Credentials struct { AccessKey string `xml:"AccessKeyId" json:"accessKey,omitempty"` SecretKey string `xml:"SecretAccessKey" json:"secretKey,omitempty"` Expiration time.Time `xml:"Expiration" json:"expiration,omitempty"` SessionToken string `xml:"SessionToken" json:"sessionToken,omitempty"` Status string `xml:"-" json:"status,omitempty"` ParentUser string `xml:"-" json:"parentUser,omitempty"` Groups []string `xml:"-" json:"groups,omitempty"` Claims map[string]interface{} `xml:"-" json:"claims,omitempty"` }
Credentials holds access and secret keys.
type ErrorCode ¶
type ErrorCode int
ErrorCode is code[int] of APIError
const (
// ErrNone is None(err=nil)
ErrNone ErrorCode
)
func ParseSignV4 ¶
Parses signature version '4' header of the following form.
Authorization: algorithm Credential=accessKeyID/credScope, SignedHeaders=signedHeaders, Signature=signature
func V4SignVerify ¶
V4SignVerify - Verify authorization header with calculated header in accordance with
returns nil if signature matches.
Click to show internal directories.
Click to hide internal directories.