@nevis-security/nevis-mobile-authentication-sdk-react
Version:
React Native plugin for Nevis Mobile Authentication SDK. Supports only mobile.
60 lines (55 loc) • 2.02 kB
JavaScript
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 the
* native Android Nevis Mobile Authentication SDK.
*/
class AndroidMetaData {
/**
* The current version of the Nevis Mobile Authentication SDK.
*/
/**
* Gives back the SHA-256 hash of the signing certificate of the application
* that includes the Nevis Mobile Authentication SDK.
*/
/**
* Default constructor for {@link AndroidMetaData}.
*
* @param mobileAuthenticationVersion the current version of the Nevis Mobile Authentication SDK.
* @param signingCertificateSha256 the SHA-256 hash of the signing certificate of the application.
* @returns an {@link AndroidMetaData} instance.
*/
static create(mobileAuthenticationVersion, signingCertificateSha256) {
return new AndroidMetaDataImpl(mobileAuthenticationVersion, signingCertificateSha256);
}
/**
* 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) {
super();
this.mobileAuthenticationVersion = mobileAuthenticationVersion;
this.signingCertificateSha256 = signingCertificateSha256;
}
static fromJson(json) {
const mobileAuthenticationVersion = _Version.Version.fromJson(json.mobileAuthenticationVersion);
return new AndroidMetaDataImpl(mobileAuthenticationVersion, json.signingCertificateSha256);
}
}
exports.AndroidMetaDataImpl = AndroidMetaDataImpl;
//# sourceMappingURL=AndroidMetaData.js.map
;