Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BasicRealm = "Authorization Required"
BasicRealm is used when setting the WWW-Authenticate response header.
Functions ¶
func Basic ¶
Basic returns a Handler that authenticates via Basic Auth. Writes a http.StatusUnauthorized if authentication fails.
func BasicFunc ¶
BasicFunc returns a Handler that authenticates via Basic Auth using the provided function. The function should return true for a valid username/password combination.
func SecureCompare ¶
SecureCompare performs a constant time compare of two strings to limit timing attacks.
Types ¶
Click to show internal directories.
Click to hide internal directories.