@nevis-security/nevis-mobile-authentication-sdk-react
Version:
React Native plugin for Nevis Mobile Authentication SDK. Supports only mobile.
37 lines (34 loc) • 1.31 kB
JavaScript
;
/**
* Copyright © 2023 Nevis Security AG. All rights reserved.
*/
import { UserVerificationHandler } from "./UserVerificationHandler.js";
import NevisMobileAuthenticationSdkReact from "../../MobileAuthenticationSdk.js";
import { OperationIdMessage } from "../../model/messages/out/OperationIdMessage.js";
import { PinVerificationMessage } from "../../model/messages/out/PinVerificationMessage.js";
/**
* The objects consuming the outcome of an interaction where the user provides
* PIN credentials.
*
* This is used with the {@link Aaid.PIN} authenticator attestation identifier.
*
* @group User Interaction
* @category Pin
* @see {@link PinUserVerifier.verifyPin}
*/
export class PinUserVerificationHandler extends UserVerificationHandler {}
export class PinUserVerificationHandlerImpl extends PinUserVerificationHandler {
constructor(operationId) {
super();
this._operationId = operationId;
}
async verifyPin(pin) {
const message = new PinVerificationMessage(this._operationId, pin);
return NevisMobileAuthenticationSdkReact.pinVerify(message);
}
async cancel() {
const message = new OperationIdMessage(this._operationId);
return NevisMobileAuthenticationSdkReact.cancel(message);
}
}
//# sourceMappingURL=PinUserVerificationHandler.js.map