Documentation ¶
Index ¶
Constants ¶
View Source
const ( AlgorithmKey = "X-Amz-Algorithm" AuthScheme = "AWS4-HMAC-SHA256" ContentHashKey = "X-Amz-Content-Sha256" EmptyContentHash = "UNSIGNED-PAYLOAD" QueryPrefix = "X-Amz-" CredentialEntryKey = "Credential" CredentialQueryKey = QueryPrefix + CredentialEntryKey SignedHeadersEntryKey = "SignedHeaders" SignedHeadersQueryKey = QueryPrefix + SignedHeadersEntryKey SignatureEntryKey = "Signature" SignatureQueryKey = QueryPrefix + SignatureEntryKey )
View Source
const ( TimeKey = "X-Amz-Date" SigningDateKeyPrefix = "AWS4" )
Variables ¶
View Source
var ( ErrUnknownAuthScheme = errors.New("unknown AWS authorization scheme") ErrEmptyCredential = errors.New("empty AWS credential") ErrEmptySignedHeaders = errors.New("empty AWS signed headers") ErrEmptySignature = errors.New("empty AWS signature") ErrEmptyContentHash = errors.New("empty AWS content hash") ErrIncompleteCredentialFields = errors.New("incomplete AWS credential fields") )
Functions ¶
func SigChecker ¶
Types ¶
type Authorization ¶
type Authorization struct { Scheme string Credential *Credential SignedHeaders []string Signature string ContentHash string }
func NewAuthorization ¶
func NewAuthorization(r *http.Request) (*Authorization, error)
type Credential ¶
type Credential struct { AccessKey api.AccessKey Date string Region string Service string Suffix string }
func NewCredential ¶
func NewCredential(raw string) (*Credential, error)
Click to show internal directories.
Click to hide internal directories.