UNPKG

@nevis-security/nevis-mobile-authentication-sdk-react

Version:

React Native plugin for Nevis Mobile Authentication SDK. Supports only mobile.

37 lines (34 loc) 1.39 kB
"use strict"; /** * Copyright © 2024 Nevis Security AG. All rights reserved. */ import { UserVerificationHandler } from "./UserVerificationHandler.js"; import NevisMobileAuthenticationSdkReact from "../../MobileAuthenticationSdk.js"; import { OperationIdMessage } from "../../model/messages/out/OperationIdMessage.js"; import { PasswordVerificationMessage } from "../../model/messages/out/PasswordVerificationMessage.js"; /** * The objects consuming the outcome of an interaction where the user provides * password credentials. * * This is used with the {@link Aaid.PASSWORD} authenticator attestation identifier. * * @group User Interaction * @category Password * @see {@link PasswordUserVerifier.verifyPassword} */ export class PasswordUserVerificationHandler extends UserVerificationHandler {} export class PasswordUserVerificationHandlerImpl extends PasswordUserVerificationHandler { constructor(operationId) { super(); this._operationId = operationId; } async verifyPassword(password) { const message = new PasswordVerificationMessage(this._operationId, password); return NevisMobileAuthenticationSdkReact.passwordVerify(message); } async cancel() { const message = new OperationIdMessage(this._operationId); return NevisMobileAuthenticationSdkReact.cancel(message); } } //# sourceMappingURL=PasswordUserVerificationHandler.js.map