Documentation ¶
Index ¶
Constants ¶
View Source
const ( Anonymous = "anonymous" Basic = "Basic" )
View Source
const (
Accept = "accept"
)
View Source
const Reject = "reject"
Variables ¶
This section is empty.
Functions ¶
func NewAcceptAll ¶
func NewAcceptAll() http.Authenticator
NewAcceptAll authenticator that will treat all incoming requests as authenticated
func NewBasic ¶
func NewBasic(get GetHashAndSalt, authenticationTTL time.Duration) http.Authenticator
NewBasic authenticator for doing basic authentication against a http context. Expects the username and password to be Base64 encoded separated by a ':'. Usernames must not contain a colon however password's can. The information should be included in the 'Authorization' header in the following format: Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l where 'QWxhZGRpbjpPcGVuU2VzYW1l' is the base64 encoded string 'Aladdin:OpenSesame'
func NewBasicHashAndSalt ¶
NewBasicHashAndSalt creates a hash and salt for the passed password that will authenticate using the BasicAuthenticator in this package.
func NewRejectAll ¶
func NewRejectAll() http.Authenticator
Types ¶
Click to show internal directories.
Click to hide internal directories.