UNPKG

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

Version:

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

35 lines (32 loc) 1.32 kB
"use strict"; /** * Copyright © 2024 Nevis Security AG. All rights reserved. */ import { UserVerificationHandler } from './UserVerificationHandler'; import NevisMobileAuthenticationSdkReact from '../../MobileAuthenticationSdk'; import { OperationIdMessage } from '../../model/messages/out/OperationIdMessage'; import { PasswordVerificationMessage } from '../../model/messages/out/PasswordVerificationMessage'; /** * 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. * * @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