open-vault/ui/app/adapters/mfa-setup.js
Florian Bürgi 474482210f
Use generate endpoint instead of admin-generate during MFA setup (#17932)
* fixes: #17113: Make MFA setup wizard call token based generate endpoint

* add changelog for #17932

* cleanup: bring back .gitkeep

* re trigger ci jobs
2022-11-22 17:05:30 -06:00

14 lines
389 B
JavaScript

import ApplicationAdapter from './application';
export default class MfaSetupAdapter extends ApplicationAdapter {
currentTokenGenerate(data) {
const url = `/v1/identity/mfa/method/totp/generate`;
return this.ajax(url, 'POST', { data });
}
adminDestroy(data) {
const url = `/v1/identity/mfa/method/totp/admin-destroy`;
return this.ajax(url, 'POST', { data });
}
}