UNPKG

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

Version:

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

72 lines (66 loc) 2.94 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AndroidMetaDataImpl = exports.AndroidMetaData = void 0; var _Version = require("./Version"); /** * Copyright © 2024 Nevis Security AG. All rights reserved. */ /** * The object containing information about Nevis Mobile Authentication SDK for Android. */ class AndroidMetaData { /** * The current version of Nevis Mobile Authentication SDK for Android. */ /** * The SHA-256 hash of the signing certificate of the application that includes the Nevis Mobile * Authentication SDK for Android. * * This information can be used to properly configure the {@link https://docs.nevis.net/configurationguide/use-cases/Mobile-Authentication/Mobile-Authentication-Use-Cases/Mobile-Authentication-with-Deep-Links#for-android | well-known} * file on the backend, to use {@link https://developer.android.com/training/app-links/verify-android-applinks | Android App Links}. */ /** * The {@link https://docs.nevis.net/mobilesdk/guide/configuration#facet-id | facet ID} used by * Nevis Mobile Authentication SDK for Android. * * 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 AndroidMetaData}. * * @param mobileAuthenticationVersion the current version of Nevis Mobile Authentication SDK for Android. * @param signingCertificateSha256 the SHA-256 hash of the signing certificate of the application. * @param applicationFacetId the facet ID used by Nevis Mobile Authentication SDK for Android. * @returns an {@link AndroidMetaData} instance. */ static create(mobileAuthenticationVersion, signingCertificateSha256, applicationFacetId) { return new AndroidMetaDataImpl(mobileAuthenticationVersion, signingCertificateSha256, applicationFacetId); } /** * Alternate constructor that creates a {@link AndroidMetaData} from a json. * * @param json contains the source for instance creation. * @returns an {@link AndroidMetaData} instance. */ static fromJson(json) { return AndroidMetaDataImpl.fromJson(json); } } exports.AndroidMetaData = AndroidMetaData; class AndroidMetaDataImpl extends AndroidMetaData { constructor(mobileAuthenticationVersion, signingCertificateSha256, applicationFacetId) { super(); this.mobileAuthenticationVersion = mobileAuthenticationVersion; this.signingCertificateSha256 = signingCertificateSha256; this.applicationFacetId = applicationFacetId; } static fromJson(json) { const mobileAuthenticationVersion = _Version.Version.fromJson(json.mobileAuthenticationVersion); return new AndroidMetaDataImpl(mobileAuthenticationVersion, json.signingCertificateSha256, json.applicationFacetId); } } exports.AndroidMetaDataImpl = AndroidMetaDataImpl; //# sourceMappingURL=AndroidMetaData.js.map