@nevis-security/nevis-mobile-authentication-sdk-react
Version:
React Native plugin for Nevis Mobile Authentication SDK. Supports only mobile.
32 lines (29 loc) • 1.12 kB
JavaScript
/**
* Copyright © 2024 Nevis Security AG. All rights reserved.
*/
import NevisMobileAuthenticationSdkReact from '../../MobileAuthenticationSdk';
import { OperationIdMessage } from '../../model/messages/out/OperationIdMessage';
import { PasswordEnrollMessage } from '../../model/messages/out/PasswordEnrollMessage';
import { CancellableHandler } from '../CancellableHandler';
/**
* The object handling the password to be enrolled.
*
* @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
;