UNPKG

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

Version:

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

38 lines (36 loc) 1.56 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PasswordChangeHandlerImpl = exports.PasswordChangeHandler = void 0; var _MobileAuthenticationSdk = _interopRequireDefault(require("../../MobileAuthenticationSdk")); var _OperationIdMessage = require("../../model/messages/out/OperationIdMessage"); var _PasswordsChangeMessage = require("../../model/messages/out/PasswordsChangeMessage"); var _CancellableHandler = require("../CancellableHandler"); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } /** * Copyright © 2024 Nevis Security AG. All rights reserved. */ /** * The object handling the old and new password provided by the end-user. * * @see {@link PasswordChanger.changePassword} */ class PasswordChangeHandler extends _CancellableHandler.CancellableHandler {} exports.PasswordChangeHandler = PasswordChangeHandler; class PasswordChangeHandlerImpl extends PasswordChangeHandler { constructor(operationId) { super(); this._operationId = operationId; } async passwords(oldPassword, newPassword) { const message = new _PasswordsChangeMessage.PasswordsChangeMessage(this._operationId, oldPassword, newPassword); return _MobileAuthenticationSdk.default.passwordsChange(message); } cancel() { const message = new _OperationIdMessage.OperationIdMessage(this._operationId); return _MobileAuthenticationSdk.default.cancel(message); } } exports.PasswordChangeHandlerImpl = PasswordChangeHandlerImpl; //# sourceMappingURL=PasswordChangeHandler.js.map