v1

package
v0.0.0-...-458fca8 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseAuthHeaders

func ParseAuthHeaders(req *http.Request) map[string]string

Types

type V1Signer

type V1Signer struct {
	*signers.Digester
	*signers.Identifiable
}

func NewV1Signer

func NewV1Signer(digest func() hash.Hash) (*V1Signer, *signers.AuthenticationError)

func (*V1Signer) Check

func (v *V1Signer) Check(req *http.Request, secret string) *signers.AuthenticationError

func (*V1Signer) CreateSignable

func (v *V1Signer) CreateSignable(req *http.Request, authHeaders map[string]string) []byte

func (*V1Signer) GenerateAuthorization

func (v *V1Signer) GenerateAuthorization(req *http.Request, authHeaders map[string]string, signature string) (string, *signers.AuthenticationError)

func (*V1Signer) GetIdentificationRegex

func (v *V1Signer) GetIdentificationRegex() *regexp.Regexp

func (*V1Signer) GetResponseSigner

func (v *V1Signer) GetResponseSigner() signers.ResponseSigner

func (*V1Signer) HashBody

func (v *V1Signer) HashBody(req *http.Request) (string, *signers.AuthenticationError)

func (*V1Signer) ParseAuthHeaders

func (v *V1Signer) ParseAuthHeaders(req *http.Request) map[string]string

func (*V1Signer) Sign

func (v *V1Signer) Sign(req *http.Request, authHeaders map[string]string, secret string) (string, *signers.AuthenticationError)

func (*V1Signer) SignDirect

func (v *V1Signer) SignDirect(req *http.Request, authHeaders map[string]string, secret string) *signers.AuthenticationError

func (*V1Signer) Version

func (v *V1Signer) Version() int

Jump to

Keyboard shortcuts

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