@nevis-security/nevis-mobile-authentication-sdk-react
Version:
React Native plugin for Nevis Mobile Authentication SDK. Supports only mobile.
35 lines (32 loc) • 1.28 kB
JavaScript
;
/**
* Copyright © 2023 Nevis Security AG. All rights reserved.
*/
import NevisMobileAuthenticationSdkReact from "../../MobileAuthenticationSdk.js";
import { AuthenticatorAaidMessage } from "../../model/messages/out/AuthenticatorAaidMessage.js";
import { OperationIdMessage } from "../../model/messages/out/OperationIdMessage.js";
import { CancellableHandler } from "../CancellableHandler.js";
/**
* The objects consuming the outcome of an interaction where the user chooses the authenticator to
* be used.
*
* @group User Interaction
* @category Authenticator Selection
* @see {@link AuthenticatorSelector.selectAuthenticator}
*/
export class AuthenticatorSelectionHandler extends CancellableHandler {}
export class AuthenticatorSelectionHandlerImpl extends AuthenticatorSelectionHandler {
constructor(operationId) {
super();
this._operationId = operationId;
}
async aaid(aaid) {
const message = new AuthenticatorAaidMessage(this._operationId, aaid);
return NevisMobileAuthenticationSdkReact.authenticatorAaid(message);
}
async cancel() {
const message = new OperationIdMessage(this._operationId);
return NevisMobileAuthenticationSdkReact.cancel(message);
}
}
//# sourceMappingURL=AuthenticatorSelectionHandler.js.map