Set up the Webauthn settings view

This commit is contained in:
Bubka
2023-10-05 14:09:04 +02:00
parent 2cd5b40ae3
commit b59ad21755
6 changed files with 263 additions and 11 deletions

View File

@ -14,5 +14,27 @@ export default {
updatePreference(name, value) {
return apiClient.put('/user/preferences/' + name, { value: value })
},
/**
* Get all webauthn devices
*
* @param {string} name
* @param {any} value
* @returns promise
*/
getWebauthnDevices(config = {}) {
return webClient.get('/webauthn/credentials', {...config})
},
/**
* Revoke a webauthn device
*
* @param {string} name
* @param {any} value
* @returns promise
*/
revokeWebauthnDevice(credentialId, config = {}) {
return webClient.delete('/webauthn/credentials/' + credentialId, {...config})
},
}