refactor(auth): move oauth handler under auth

pull/2749/head
Chaim Lev Ari 2019-01-16 17:24:58 +02:00
parent f6bdc5c2b3
commit 4cbde7bb0d
2 changed files with 4 additions and 3 deletions

View File

@ -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
}

View File

@ -1,2 +1,2 @@
angular.module('portainer.extensions.oauth', ['ngResource'])
.constant('API_ENDPOINT_OAUTH', 'api/oauth');
.constant('API_ENDPOINT_OAUTH', 'api/auth/oauth');