Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
feat: add msServices mfa calls
Browse files Browse the repository at this point in the history
ref: MANAGER-3014

Signed-off-by: Cyrille Bourgois <[email protected]>
  • Loading branch information
Cyrille Bourgois committed Jan 16, 2020
1 parent 191bfa6 commit 7670c61
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/api/msServices/account/account.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ angular
v6() {
return $injector.get('OvhApiMsServicesAccountV6');
},
Mfa() {
return $injector.get('OvhApiMsServicesAccountMfa');
},
}));
7 changes: 7 additions & 0 deletions src/api/msServices/account/mfa/mfa.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
angular
.module('ovh-api-services')
.service('OvhApiMsServicesAccountMfa', ($injector) => ({
v6() {
return $injector.get('OvhApiMsServicesAccountMfaV6');
},
}));
24 changes: 24 additions & 0 deletions src/api/msServices/account/mfa/mfa.v6.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
angular.module('ovh-api-services')
.service('OvhApiMsServicesAccountMfaV6', ($resource) => $resource(
'/msServices/:serviceName/account/:userPrincipalName/mfa',
{
serviceName: '@serviceName',
userPrincipalName: '@userPrincipalName',
}, {
get: { method: 'GET' },
create: { method: 'POST' },
delete: { method: 'DELETE' },
disable: {
method: 'POST',
url: '/msServices/:serviceName/account/:userPrincipalName/mfa/disable',
},
enable: {
method: 'POST',
url: '/msServices/:serviceName/account/:userPrincipalName/mfa/enable',
},
reset: {
method: 'POST',
url: '/msServices/:serviceName/account/:userPrincipalName/mfa/reset',
},
},
));
3 changes: 3 additions & 0 deletions src/api/msServices/msServices.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ angular
Sharepoint() {
return $injector.get('OvhApiMsServicesSharepoint');
},
v6() {
return $injector.get('OvhApiMsServicesV6');
},
}));
8 changes: 8 additions & 0 deletions src/api/msServices/msServices.service.v6.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ angular
edit: {
method: 'PUT', cache, isArray: false, interceptor,
},
createMfaOnAllUsers: {
method: 'POST',
url: '/msServices/:serviceName/createMfaOnAllUsers ',
},
removeMfaOnAllUsers: {
method: 'POST',
url: '/msServices/:serviceName/removeMfaOnAllUsers',
},
});

resource.resetCache = function () {
Expand Down

0 comments on commit 7670c61

Please sign in to comment.