@nevis-security/nevis-mobile-authentication-sdk-react
Version:
React Native plugin for Nevis Mobile Authentication SDK. Supports only mobile.
34 lines (31 loc) • 1.1 kB
JavaScript
;
/**
* Copyright © 2023 Nevis Security AG. All rights reserved.
*/
import NevisMobileAuthenticationSdkReact from "../../MobileAuthenticationSdk.js";
import { OperationIdMessage } from "../../model/messages/out/OperationIdMessage.js";
import { PinEnrollMessage } from "../../model/messages/out/PinEnrollMessage.js";
import { CancellableHandler } from "../CancellableHandler.js";
/**
* The object handling the PIN to be enrolled.
*
* @group User Interaction
* @category Pin
* @see {@link PinEnroller.enrollPin}
*/
export class PinEnrollmentHandler extends CancellableHandler {}
export class PinEnrollmentHandlerImpl extends PinEnrollmentHandler {
constructor(operationId) {
super();
this._operationId = operationId;
}
async pin(pin) {
const message = new PinEnrollMessage(this._operationId, pin);
return NevisMobileAuthenticationSdkReact.pinEnroll(message);
}
async cancel() {
const message = new OperationIdMessage(this._operationId);
return NevisMobileAuthenticationSdkReact.cancel(message);
}
}
//# sourceMappingURL=PinEnrollmentHandler.js.map