Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoAuthHeader = no authorization header ErrNoAuthHeader = errors.New("missing authorization header of type Basic") // ErrAuthHeaderHasInvalidLen = auth header has invalid length ErrAuthHeaderHasInvalidLen = errors.New("auth header has invalid length") // ErrAuthHeaderNotBasic = auth header expected to be \"Basic ...\" ErrAuthHeaderNotBasic = errors.New("auth header expected to be \"Basic ...\"") // ErrAuthHeaderInvalidFormat = auth header has invalid format, expect \"Basic keyID:sha512(Key)\" ErrAuthHeaderInvalidFormat = errors.New("auth header has invalid format, expect \"Basic keyID:sha512(Key)\"") // ErrAuthHeaderInvalid = auth header is invalid ErrAuthHeaderInvalid = errors.New("auth header is invalid") )
Functions ¶
func GenAuthHeaderKey ¶
GenAuthHeaderKey generates a authentication header value
Types ¶
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
Helper helps authenticate a user
func NewHelper ¶
func NewHelper(dbConn db.Connection) *Helper
NewHelper returns a new instance of AuthHelper
func (*Helper) RemoveKeyCache ¶
RemoveKeyCache removes a cached key
Click to show internal directories.
Click to hide internal directories.