diff --git a/api/http/handler/auth/handler.go b/api/http/handler/auth/handler.go index 073da3a69..a97928150 100644 --- a/api/http/handler/auth/handler.go +++ b/api/http/handler/auth/handler.go @@ -37,10 +37,11 @@ func NewHandler(bouncer *security.RequestBouncer, rateLimiter *security.RateLimi Router: mux.NewRouter(), authDisabled: authDisabled, } + + h.Handle("/auth/oauth", + rateLimiter.LimitAccess(bouncer.PublicAccess(httperror.LoggerHandler(h.authenticateOAuth)))).Methods(http.MethodPost) h.Handle("/auth", rateLimiter.LimitAccess(bouncer.PublicAccess(httperror.LoggerHandler(h.authenticate)))).Methods(http.MethodPost) - h.Handle("/oauth", - rateLimiter.LimitAccess(bouncer.PublicAccess(httperror.LoggerHandler(h.authenticateOAuth)))).Methods(http.MethodPost) return h } diff --git a/app/extensions/oauth/__module.js b/app/extensions/oauth/__module.js index 413d9d4f6..8292353a5 100644 --- a/app/extensions/oauth/__module.js +++ b/app/extensions/oauth/__module.js @@ -1,2 +1,2 @@ angular.module('portainer.extensions.oauth', ['ngResource']) - .constant('API_ENDPOINT_OAUTH', 'api/oauth'); + .constant('API_ENDPOINT_OAUTH', 'api/auth/oauth');