Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAlgoNotFound = errors.New("Algorithm not found")
View Source
var ErrAuthHeader = errors.New("Invalid Authorization header")
View Source
var ErrAuthHeaderCannotBeEmpty = errors.New("Auth header cannot be empty")
View Source
var ErrCannotDecodeBase64EncodedMACHeader = errors.New("Cannot decode base64 encoded MAC header")
View Source
var ErrCannotDecodeHexEncodedMACHeader = errors.New("Cannot decode hex encoded MAC header")
View Source
var ErrCannotReadRequestBody = errors.New("Failed to read request body")
View Source
var ErrHashDoesNotMatch = errors.New("Invalid Signature - Hash does not match")
View Source
var ErrInvalidAuthLength = errors.New("Invalid Basic Auth Length")
View Source
var ErrInvalidEncoding = errors.New("Invalid header encoding")
View Source
var ErrInvalidHeaderStructure = errors.New("Invalid header structure")
View Source
var ErrInvalidIP = errors.New("Source IP not supported")
View Source
var ErrSignatureCannotBeEmpty = errors.New("Signature cannot be empty")
Functions ¶
This section is empty.
Types ¶
type APIKeyVerifier ¶
type APIKeyVerifier struct {
// contains filtered or unexported fields
}
func NewAPIKeyVerifier ¶
func NewAPIKeyVerifier(key, header string) *APIKeyVerifier
func (*APIKeyVerifier) VerifyRequest ¶
func (aV *APIKeyVerifier) VerifyRequest(r *http.Request, payload []byte) error
type BasicAuthVerifier ¶
type BasicAuthVerifier struct {
// contains filtered or unexported fields
}
func NewBasicAuthVerifier ¶
func NewBasicAuthVerifier(username, password string) *BasicAuthVerifier
func (*BasicAuthVerifier) VerifyRequest ¶
func (baV *BasicAuthVerifier) VerifyRequest(r *http.Request, payload []byte) error
type GithubVerifier ¶
type GithubVerifier struct {
HmacOpts *HmacOptions
}
func NewGithubVerifier ¶
func NewGithubVerifier(secret string) *GithubVerifier
func (*GithubVerifier) VerifyRequest ¶
func (gV *GithubVerifier) VerifyRequest(r *http.Request, payload []byte) error
type HmacOptions ¶
type HmacVerifier ¶
type HmacVerifier struct {
// contains filtered or unexported fields
}
func NewHmacVerifier ¶
func NewHmacVerifier(opts *HmacOptions) *HmacVerifier
func (*HmacVerifier) VerifyRequest ¶
func (hV *HmacVerifier) VerifyRequest(r *http.Request, payload []byte) error
Click to show internal directories.
Click to hide internal directories.