From 8c415f2a39ea2b605c6b365aef6453caa526bc16 Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Sat, 2 Nov 2019 08:03:35 -0600 Subject: [PATCH] Update to scoped oauth --- server/server.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/server.go b/server/server.go index c38737d..863f326 100755 --- a/server/server.go +++ b/server/server.go @@ -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 }