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

Functions

func Sign

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

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

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

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

Sign4 signs a request with Signed Signature Version 4.

func SignS3

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

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.

Types

type Credentials

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.

Source Files

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

Version
v0.0.0-20180515143844-0c1422d1fdb9 (latest)
Published
May 15, 2018
Platform
linux/amd64
Imports
19 packages
Last checked
4 days ago

Tools for package owners.