UNPKG

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

Version:

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

42 lines (39 loc) 1.89 kB
"use strict"; /** * Copyright © 2023 Nevis Security AG. All rights reserved. */ import { OsAuthenticationListenHandlerImpl } from "./OsAuthenticationListenHandler.js"; import { UserVerificationHandler } from "./UserVerificationHandler.js"; import NevisMobileAuthenticationSdkReact from "../../MobileAuthenticationSdk.js"; import { ListenForOsCredentialsMessage } from "../../model/messages/out/ListenForOsCredentialsMessage.js"; import { OperationIdMessage } from "../../model/messages/out/OperationIdMessage.js"; import { TypedFingerprintPromptOptions } from "../../model/typed/TypedPromptOptions.js"; /** * The objects consuming the outcome of an interaction where the user provides fingerprint credentials. * * This is used with the {@link Aaid.FINGERPRINT} authenticator attestation identifier. * * @group User Interaction * @category Fingerprint * @see {@link FingerprintUserVerifier.verifyFingerprint} */ export class FingerprintUserVerificationHandler extends UserVerificationHandler {} export class FingerprintUserVerificationHandlerImpl extends FingerprintUserVerificationHandler { constructor(operationId) { super(); this._operationId = operationId; this._listenForOsCredentials = new OsAuthenticationListenHandlerImpl(operationId); } async listenForOsCredentials(fingerprintOptions) { const typedFingerprintPromptOptions = new TypedFingerprintPromptOptions(fingerprintOptions); const message = new ListenForOsCredentialsMessage(this._operationId, typedFingerprintPromptOptions); return NevisMobileAuthenticationSdkReact.listenForOsCredentials(message).then(() => { return this._listenForOsCredentials; }); } async cancel() { const message = new OperationIdMessage(this._operationId); return NevisMobileAuthenticationSdkReact.cancel(message); } } //# sourceMappingURL=FingerprintUserVerificationHandler.js.map