Auth CLI, continued
This commit is contained in:
parent
03a4e3e8e9
commit
393f95aeac
6 changed files with 183 additions and 43 deletions
|
@ -1134,7 +1134,7 @@ func (s *Server) withAuth(next handleFunc, perm auth.Permission) handleFunc {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
user := auth.Everyone
|
||||
var user *auth.User // may stay nil if no auth header!
|
||||
username, password, ok := r.BasicAuth()
|
||||
if ok {
|
||||
if user, err = s.auth.Authenticate(username, password); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue