hashauth

package
v0.0.0-...-6e4093b Latest Latest
Warning

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

Go to latest
Published: May 10, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateHash

func GenerateHash(h hash.Hash, data []byte) (hash string)

Types

type HTTPHashAuthenticator

type HTTPHashAuthenticator struct {
	// contains filtered or unexported fields
}

func NewHTTPHashAuthenticator

func NewHTTPHashAuthenticator(
	secret string,
	retrieveData func(r *http.Request) (hash, data string, err error, skipAuth bool)) *HTTPHashAuthenticator

func (*HTTPHashAuthenticator) Auth

type HashAuthenticator

type HashAuthenticator struct {
	// contains filtered or unexported fields
}

func NewHashAuthenticator

func NewHashAuthenticator(secret string) *HashAuthenticator

func (*HashAuthenticator) Authenticate

func (a *HashAuthenticator) Authenticate(givenHash string, data string) (valid bool)

Jump to

Keyboard shortcuts

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