Documentation ¶
Overview ¶
Package awsauth implements AWS request signing using Signed Signature Version 2, Signed Signature Version 4, and the S3 Custom HTTP Authentication Scheme.
Index ¶
- func Sign(req *http.Request) *http.Request
- func Sign2(req *http.Request) *http.Request
- func Sign3(req *http.Request) *http.Request
- func Sign4(req *http.Request) *http.Request
- func SignS3(req *http.Request) *http.Request
- func SignS3Url(req *http.Request, expire time.Time) *http.Request
- type Credentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Sign ¶
Sign signs a request bound for AWS. It automatically chooses the best authentication scheme based on the service the request is going to.
func Sign2 ¶
Sign2 signs a request with Signed Signature Version 2. If the service you're accessing supports Version 4, use that instead.
func Sign3 ¶
Sign3 signs a request with Signed Signature Version 3. If the service you're accessing supports Version 4, use that instead.
func SignS3 ¶
SignS3 signs a request bound for Amazon S3 using their custom HTTP authentication scheme.
Types ¶
type Credentials ¶
type Credentials struct { AccessKeyID string SecretAccessKey string SecurityToken string `json:"Token"` Expiration time.Time }
var Keys *Credentials
Keys stores the authentication credentials to be used when signing requests. You can set them manually or leave it to awsauth to use environment variables.