UNPKG

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

Version:

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

57 lines (51 loc) 1.86 kB
"use strict"; /** * Copyright © 2024 Nevis Security AG. All rights reserved. */ import { Version } from './Version'; /** * The object containing information about Nevis Mobile Authentication SDK for iOS. */ export class IosMetaData { /** * The current version of Nevis Mobile Authentication SDK for iOS. */ /** * The {@link https://docs.nevis.net/mobilesdk/guide/configuration#facet-id | facet ID} used by * Nevis Mobile Authentication SDK for iOS. * * The facet ID of your application has to match the list of allowed facets stored provided by * the facet service of the backend. */ /** * Default constructor for {@link IosMetaData}. * * @param mobileAuthenticationVersion the current version of Nevis Mobile Authentication SDK for iOS. * @param applicationFacetId the facet ID used by Nevis Mobile Authentication SDK for iOS. * @returns an {@link IosMetaData} instance. */ static create(mobileAuthenticationVersion, applicationFacetId) { return new IOSMetaDataImpl(mobileAuthenticationVersion, applicationFacetId); } /** * Alternate constructor that creates a {@link IosMetaData} from a json. * * @param json contains the source for instance creation. * @returns a {@link IosMetaData} instance. */ static fromJson(json) { return IOSMetaDataImpl.fromJson(json); } } export class IOSMetaDataImpl extends IosMetaData { constructor(mobileAuthenticationVersion, applicationFacetId) { super(); this.mobileAuthenticationVersion = mobileAuthenticationVersion; this.applicationFacetId = applicationFacetId; } static fromJson(json) { const mobileAuthenticationVersion = Version.fromJson(json.mobileAuthenticationVersion); return new IOSMetaDataImpl(mobileAuthenticationVersion, json.applicationFacetId); } } //# sourceMappingURL=IosMetaData.js.map