mirror of https://github.com/portainer/portainer
refactor(auth): move oauth handler under auth
parent
f6bdc5c2b3
commit
4cbde7bb0d
|
@ -37,10 +37,11 @@ func NewHandler(bouncer *security.RequestBouncer, rateLimiter *security.RateLimi
|
||||||
Router: mux.NewRouter(),
|
Router: mux.NewRouter(),
|
||||||
authDisabled: authDisabled,
|
authDisabled: authDisabled,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h.Handle("/auth/oauth",
|
||||||
|
rateLimiter.LimitAccess(bouncer.PublicAccess(httperror.LoggerHandler(h.authenticateOAuth)))).Methods(http.MethodPost)
|
||||||
h.Handle("/auth",
|
h.Handle("/auth",
|
||||||
rateLimiter.LimitAccess(bouncer.PublicAccess(httperror.LoggerHandler(h.authenticate)))).Methods(http.MethodPost)
|
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
|
return h
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
angular.module('portainer.extensions.oauth', ['ngResource'])
|
angular.module('portainer.extensions.oauth', ['ngResource'])
|
||||||
.constant('API_ENDPOINT_OAUTH', 'api/oauth');
|
.constant('API_ENDPOINT_OAUTH', 'api/auth/oauth');
|
||||||
|
|
Loading…
Reference in New Issue