BasicAuth returns a Basic HTTP Authorization middleware. It takes as argument a map[string]string where the key is the user name and the value is the password.
(accounts Accounts)
| 70 | // BasicAuth returns a Basic HTTP Authorization middleware. It takes as argument a map[string]string where |
| 71 | // the key is the user name and the value is the password. |
| 72 | func BasicAuth(accounts Accounts) HandlerFunc { |
| 73 | return BasicAuthForRealm(accounts, "") |
| 74 | } |
| 75 | |
| 76 | func processAccounts(accounts Accounts) authPairs { |
| 77 | length := len(accounts) |