auth

package
v0.0.0-...-e00298a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSConfig

type AWSConfig struct {
	AccessKeyID     string `yaml:"access_key_id"`
	SecretAccessKey string `yaml:"secret_access_key"`
	Region          string `yaml:"region"`
}

AWSConfig provide credential for AWS services signing

type BasicConfig

type BasicConfig struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

BasicConfig - username & password for HTTP Basic Auth

type Signer

type Signer interface {
	Sign(r *http.Request, body []byte) error
}

Signer add the Authorization header to http request

func NewAWSSigner

func NewAWSSigner(cfg AWSConfig, service string) Signer

NewAWSSigner provides AWS v4 signing to given request

func NewBasicSigner

func NewBasicSigner(cfg BasicConfig) Signer

NewBasicSigner provides basic authentication to given request

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL