Actualizar autenticador (confirmación)
Verify an authenticator app after adding it using the add authenticator method.
PUT
/account/mfa/authenticators/{type}Alcance accountVerify an authenticator app after adding it using the add authenticator method.
Parámetros
Sección titulada «Parámetros»type AuthenticatorType obligatorio
Type of authenticator. Valores: totp.
otp string obligatorio
Valid verification token.
Acceso: sesión del usuario (vale lo que permitan los permisos del recurso).
Respuestas
Sección titulada «Respuestas»200Éxito400Parámetro inválido o faltante401Sin sesión, sin permiso en el recurso o clave sin el alcance404Recurso de la ruta no encontrado429Límite de peticionesTodo error llega como JSON con code, type y message: consulta Errores.
import { Client, Account, AuthenticatorType } from '@owbase/web';
const client = new Client() .setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>'); // Your project ID
const account = new Account(client);
const result = await account.updateMFAAuthenticator({ type: AuthenticatorType.Totp, otp: '<OTP>',});
console.log(result);import { Client, Account, AuthenticatorType } from '@owbase/node';
const client = new Client() .setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID .setSession(''); // The user session to authenticate with
const account = new Account(client);
const result = await account.updateMFAAuthenticator({ type: AuthenticatorType.Totp, otp: '<OTP>',});curl -X PUT "https://cloud.owbase.dev/v1/account/mfa/authenticators/<TYPE>" \ -H "X-Owbase-Project: <PROJECT_ID>" \ -H "X-Owbase-Session: <SESSION>" \ -H "Content-Type: application/json" \ -d '{"otp":"<OTP>"}'Respuesta200 OK
{ "$id": "5e5ea5c16897e", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", "name": "John Doe", "password": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L/4LdgrVRXxE", "hash": "argon2", "hashOptions": {}, "registration": "2020-10-15T06:38:00.000+00:00", "status": true, "labels": [ "vip" ], "passwordUpdate": "2020-10-15T06:38:00.000+00:00", "phone": "+4930901820", "emailVerification": true, "emailIsFree": true, "emailIsDisposable": false, "emailIsCorporate": true, "emailIsCanonical": true, "passwordPwned": false, "phoneVerification": true, "mfa": true, "prefs": { "theme": "pink", "timezone": "UTC" }, "targets": [ { "$id": "259125845563242502", "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", "name": "Apple iPhone 12", "userId": "259125845563242502", "providerId": "259125845563242502", "providerType": "email", "identifier": "token", "expired": false } ], "accessedAt": "2020-10-15T06:38:00.000+00:00", "impersonator": false, "impersonatorUserId": "5e5ea5c16897e"}Las descripciones de esta página vienen de la especificación de la API del servidor (licencia BSD-3-Clause), en inglés, y los ejemplos vienen del generador de SDKs (licencia MIT). Los avisos completos están en el archivo NOTICE de los paquetes @owbase/web y @owbase/node.
¿Te ayudó esta página?Gracias por tu opinión.