Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ErrInvName is the error for invalid name. ErrInvName = "invalid user name" // ErrBlankPass is the error for blank password ErrBlankPass = "blank password isn't allowed" //ErrInvHash is the error for invalid hash type ErrInvHash = "invalid password hash type" )
View Source
const ErrDecodeUsrPass = "failed to decode the user and password string"
View Source
const ErrInvalidAuthHeader = "invalid authorization header"
View Source
const ErrInvalidAuthScheme = "invalid authorization scheme"
View Source
const ErrInvalidAuthString = "invalid authorization string"
View Source
const ErrInvalidUsrPassString = "invalid user pass string"
View Source
const ErrNoAuthHeader = "no authorization header found"
Variables ¶
View Source
var Hash map[string]hash.Hash
Functions ¶
func Basic ¶
Basic gets the first scheme in Authorization header and return the userid and the password.
func BasicAuth ¶
func BasicAuth(realm string, v Validator, handler http.HandlerFunc) http.HandlerFunc
Types ¶
Click to show internal directories.
Click to hide internal directories.