go-aws-auth: github.com/smartystreets/go-aws-auth Index | Files

package awsauth

import "github.com/smartystreets/go-aws-auth"

Package awsauth implements AWS request signing using Signed Signature Version 2, Signed Signature Version 3, and Signed Signature Version 4. Supports S3 and STS.

Index

Package Files

awsauth.go common.go s3.go sign2.go sign3.go sign4.go

func Sign Uses

func Sign(request *http.Request, credentials ...Credentials) *http.Request

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 Uses

func Sign2(request *http.Request, credentials ...Credentials) *http.Request

Sign2 signs a request with Signed Signature Version 2. If the service you're accessing supports Version 4, use that instead.

func Sign3 Uses

func Sign3(request *http.Request, credentials ...Credentials) *http.Request

Sign3 signs a request with Signed Signature Version 3. If the service you're accessing supports Version 4, use that instead.

func Sign4 Uses

func Sign4(request *http.Request, credentials ...Credentials) *http.Request

Sign4 signs a request with Signed Signature Version 4.

func SignS3 Uses

func SignS3(request *http.Request, credentials ...Credentials) *http.Request

SignS3 signs a request bound for Amazon S3 using their custom HTTP authentication scheme.

func SignS3Url Uses

func SignS3Url(request *http.Request, expire time.Time, credentials ...Credentials) *http.Request

SignS3Url signs a GET request for a resource on Amazon S3 by appending query string parameters containing credentials and signature. You must specify an expiration date for these signed requests. After that date, a request signed with this method will be rejected by S3.

type Credentials Uses

type Credentials struct {
    AccessKeyID     string
    SecretAccessKey string
    SecurityToken   string `json:"Token"`
    Expiration      time.Time
}

Credentials stores the information necessary to authorize with AWS and it is from this information that requests are signed.

Package awsauth imports 19 packages (graph) and is imported by 102 packages. Updated 2019-01-08. Refresh now. Tools for package owners.