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:
parent
0a439b3893
commit
c28274667d
5 changed files with 63 additions and 37 deletions
|
@ -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'
|
||||
}
|
||||
}
|
||||
});
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue