feat: hook authentication method

This commit is contained in:
Ramires Viana 2021-09-13 13:47:06 +00:00 committed by Oleg Lobanov
parent f80b016ef0
commit dda9a389f3
12 changed files with 340 additions and 14 deletions

View file

@ -107,7 +107,7 @@ var loginHandler = func(w http.ResponseWriter, r *http.Request, d *data) (int, e
return http.StatusInternalServerError, err
}
user, err := auther.Auth(r, d.store.Users, d.server.Root)
user, err := auther.Auth(r, d.store.Users, d.settings, d.server)
if err == os.ErrPermission {
return http.StatusForbidden, nil
} else if err != nil {