1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-04 13:25:26 +02:00

refactor(oauth): use oauth2 to generate login url

This commit is contained in:
Chaim Lev Ari 2019-01-18 10:13:33 +02:00
parent 0a439b3893
commit c28274667d
5 changed files with 63 additions and 37 deletions

View file

@ -1,9 +1,13 @@
angular.module('portainer.extensions.oauth')
.factory('OAuth', ['$resource', 'API_ENDPOINT_OAUTH', function OAuthFactory($resource, API_ENDPOINT_OAUTH) {
'use strict';
return $resource(API_ENDPOINT_OAUTH, {}, {
login: {
method: 'POST', ignoreLoadingBar: true
return $resource(API_ENDPOINT_OAUTH + '/:action', {}, {
validate: {
method: 'POST',
ignoreLoadingBar: true,
params: {
action: 'validate'
}
}
});
}]);