Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasicAuth ¶
func BasicAuth(accounts Accounts) app.HandlerFunc
BasicAuth is a constructor of BasicAuth verifier to hertz middleware It returns a Basic HTTP Authorization middleware. It takes as argument a map[string]string where the key is the username and the value is the password.
func BasicAuthForRealm ¶
func BasicAuthForRealm(accounts Accounts, realm, userKey string) app.HandlerFunc
BasicAuthForRealm returns a Basic HTTP Authorization middleware. It takes as arguments a map[string]string where the key is the username and the value is the password, as well as the name of the Realm. If the realm is empty, "Authorization Required" will be used by default. (see http://tools.ietf.org/html/rfc2617#section-1.2)
Types ¶
Click to show internal directories.
Click to hide internal directories.