UNPKG

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

Version:

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

34 lines (31 loc) 1.18 kB
"use strict"; /** * Copyright © 2024 Nevis Security AG. All rights reserved. */ import NevisMobileAuthenticationSdkReact from "../../MobileAuthenticationSdk.js"; import { OperationIdMessage } from "../../model/messages/out/OperationIdMessage.js"; import { PasswordEnrollMessage } from "../../model/messages/out/PasswordEnrollMessage.js"; import { CancellableHandler } from "../CancellableHandler.js"; /** * The object handling the password to be enrolled. * * @group User Interaction * @category Password * @see {@link PasswordEnroller.enrollPassword} */ export class PasswordEnrollmentHandler extends CancellableHandler {} export class PasswordEnrollmentHandlerImpl extends PasswordEnrollmentHandler { constructor(operationId) { super(); this._operationId = operationId; } async password(password) { const message = new PasswordEnrollMessage(this._operationId, password); return NevisMobileAuthenticationSdkReact.passwordEnroll(message); } async cancel() { const message = new OperationIdMessage(this._operationId); return NevisMobileAuthenticationSdkReact.cancel(message); } } //# sourceMappingURL=PasswordEnrollmentHandler.js.map