Update to scoped oauth

master
Bel LaPointe 2019-11-02 08:03:35 -06:00
parent df0232e24c
commit 8c415f2a39
1 changed files with 3 additions and 2 deletions

View File

@ -119,8 +119,9 @@ func (s *Server) doAuth(foo http.HandlerFunc) http.HandlerFunc {
w.WriteHeader(http.StatusInternalServerError)
return
}
if boauthz, useoauth := config.GetBOAuthZ(); ok && useoauth {
err := oauth2client.Authenticate(boauthz, w, r)
if url, exists := config.GetBOAuthZ(); ok && exists {
name := mapKey(r.Host)
err := oauth2client.Authenticate(url, name, w, r)
if err != nil {
return
}