v2

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: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EscapeProper

func EscapeProper(s string) string

func ParseAuthHeaders

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

Types

type V2ResponseSigner

type V2ResponseSigner struct {
	*signers.Digester
}

func NewV2ResponseSigner

func NewV2ResponseSigner(digest func() hash.Hash) *V2ResponseSigner

func (*V2ResponseSigner) Check

func (*V2ResponseSigner) CreateSignable

func (v *V2ResponseSigner) CreateSignable(req *http.Request, authHeaders map[string]string, rw *signers.SignableResponseWriter) []byte

func (*V2ResponseSigner) SetTrailer

func (v *V2ResponseSigner) SetTrailer(rw http.ResponseWriter)

func (*V2ResponseSigner) SignResponse

func (*V2ResponseSigner) SignResponseDirect

type V2Signer

type V2Signer struct {
	*signers.Digester
	*signers.Identifiable
	// contains filtered or unexported fields
}

func NewV2Signer

func NewV2Signer(digest func() hash.Hash) (*V2Signer, *signers.AuthenticationError)

func (*V2Signer) Check

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

func (*V2Signer) CreateSignable

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

func (*V2Signer) GenerateAuthorization

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

func (*V2Signer) GetIdentificationRegex

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

func (*V2Signer) GetResponseSigner

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

func (*V2Signer) HashBody

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

func (*V2Signer) HashBytes

func (v *V2Signer) HashBytes(b []byte) string

func (*V2Signer) ParseAuthHeaders

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

func (*V2Signer) Sign

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

func (*V2Signer) SignDirect

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

func (*V2Signer) Version

func (v *V2Signer) Version() int

Jump to

Keyboard shortcuts

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