UNPKG

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

Version:

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

41 lines (39 loc) 1.8 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PasswordUserVerificationHandlerImpl = exports.PasswordUserVerificationHandler = void 0; var _UserVerificationHandler = require("./UserVerificationHandler"); var _MobileAuthenticationSdk = _interopRequireDefault(require("../../MobileAuthenticationSdk")); var _OperationIdMessage = require("../../model/messages/out/OperationIdMessage"); var _PasswordVerificationMessage = require("../../model/messages/out/PasswordVerificationMessage"); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } /** * Copyright © 2024 Nevis Security AG. All rights reserved. */ /** * 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} */ class PasswordUserVerificationHandler extends _UserVerificationHandler.UserVerificationHandler {} exports.PasswordUserVerificationHandler = PasswordUserVerificationHandler; class PasswordUserVerificationHandlerImpl extends PasswordUserVerificationHandler { constructor(operationId) { super(); this._operationId = operationId; } async verifyPassword(password) { const message = new _PasswordVerificationMessage.PasswordVerificationMessage(this._operationId, password); return _MobileAuthenticationSdk.default.passwordVerify(message); } async cancel() { const message = new _OperationIdMessage.OperationIdMessage(this._operationId); return _MobileAuthenticationSdk.default.cancel(message); } } exports.PasswordUserVerificationHandlerImpl = PasswordUserVerificationHandlerImpl; //# sourceMappingURL=PasswordUserVerificationHandler.js.map