@ideem/zsm-client-sdk 2.8.1 → 2.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ZSMClientSDK.js CHANGED
@@ -1,43 +1 @@
1
- import eventCoordinator from './EventCoordinator.js';
2
- import {UMFAClient as UMFAClientCore} from './UMFAClient.js';
3
- import {FIDO2Client as FIDO2ClientCore} from './FIDO2Client.js';
4
- import RelyingParty from './RelyingParty.js';
5
- import WebAuthnClient from './WebAuthnClient.js';
6
- import {zsmPluginManager} from './PluginManager.js';
7
- import GLOBAL from './GlobalScoping.js';
8
-
9
-
10
- class UMFAClient {
11
- constructor(config) {
12
- zsmPluginManager.freezePlugins();
13
- const UMFAClientClass = zsmPluginManager.classes('UMFAClient');
14
- const umfaInstance = new UMFAClientClass(config);
15
- eventCoordinator.setCoreSDKClass('UMFAClient', umfaInstance);
16
- return umfaInstance;
17
- }
18
- }
19
-
20
- class FIDO2Client {
21
- constructor(config) {
22
- zsmPluginManager.freezePlugins();
23
- const FIDO2ClientClass = zsmPluginManager.classes('FIDO2Client');
24
- const fido2Instance = new FIDO2ClientClass(config);
25
- eventCoordinator.setCoreSDKClass('FIDO2Client', fido2Instance);
26
- return fido2Instance;
27
- }
28
- }
29
-
30
- zsmPluginManager.registerPlugin('Core', {
31
- classDefs: {
32
- "UMFAClient" : UMFAClientCore,
33
- "FIDO2Client" : FIDO2ClientCore,
34
- "RelyingParty" : RelyingParty,
35
- "WebAuthnClient" : WebAuthnClient
36
- },
37
- mode: 'OVERRIDE'
38
- });
39
-
40
- const ZSMClientSDKVersion = '2.8.0';
41
- const ZSMVersions = GLOBAL.ZSMVersions = (GLOBAL.ZSMVersions) ? {...GLOBAL.ZSMVersions, CORE: ZSMClientSDKVersion} : { CORE: ZSMClientSDKVersion }
42
-
43
- export { UMFAClient, FIDO2Client, ZSMVersions };
1
+ import e from"./EventCoordinator.js";import{UMFAClient as s}from"./UMFAClient.js";import{FIDO2Client as r}from"./FIDO2Client.js";import t from"./RelyingParty.js";import n from"./WebAuthnClient.js";import{zsmPluginManager as o}from"./PluginManager.js";import i from"./GlobalScoping.js";class l{constructor(s){o.freezePlugins();const r=new(o.classes("UMFAClient"))(s);return e.setCoreSDKClass("UMFAClient",r),r}}class C{constructor(s){o.freezePlugins();const r=new(o.classes("FIDO2Client"))(s);return e.setCoreSDKClass("FIDO2Client",r),r}}o.registerPlugin("Core",{classDefs:{UMFAClient:s,FIDO2Client:r,RelyingParty:t,WebAuthnClient:n},mode:"OVERRIDE"});const a="2.9.1",m=i.ZSMVersions=i.ZSMVersions?{...i.ZSMVersions,CORE:a}:{CORE:a};export{l as UMFAClient,C as FIDO2Client,m as ZSMVersions};
@@ -1,17 +1 @@
1
- /**
2
- * @name encodeUserIdentifier
3
- * @description Placeholder function for encoding user identifiers (this will be used in the one-way hashing operation to obfuscate client-side userIdentifiers/customerDefinedIdentifiers
4
- * @ before they are sent to the server, to protect user privacy). Currently, this function is defined as (and being USED as) a no-op - it simply hands back the input as-is,
5
- * @ but this will be replaced with the actual encoding function once the hashing mechanism has been finalized and implemented.
6
- * @param {string} userIdentifier The user identifier to be encoded (e.g., email, username, etc.)
7
- * @returns {string} The encoded user identifier
8
- * @throws {TypeError} If the input is not a string or is missing
9
- * @memberof UMFAClientBase, FIDO2ClientBase
10
- * @example const encodedId = encodeUserIdentifier("some@email.com");
11
- */
12
- function encodeUserIdentifier(userIdentifier) {
13
- if (typeof userIdentifier !== 'string') throw new TypeError(`[encodeUserIdentifier.js] :: encodeUserIdentifier :: userIdentifier is a required parameter and must be a string. Received ${userIdentifier} (type: ${typeof userIdentifier})`);
14
- return userIdentifier;
15
- }
16
-
17
- export { encodeUserIdentifier };
1
+ function e(e){if("string"!=typeof e)throw new TypeError(`[encodeUserIdentifier.js] :: encodeUserIdentifier :: userIdentifier is a required parameter and must be a string. Received ${e} (type: ${typeof e})`);return e}export{e as encodeUserIdentifier};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name" : "@ideem/zsm-client-sdk",
3
- "version" : "2.8.1",
3
+ "version" : "2.9.1",
4
4
  "description" : "ZSM makes 2FA easy and invisible for everyone, all the time, using advanced cryptography like MPC to establish cryptographic proof of the origin of any transaction or login attempt, while eliminating opportunities for social engineering. ZSM has no reliance on specific hardware. Our cryptographic module has completed FIPS 140-3 NIST approved lab testing, is FIDO2-ready, and is on the Modules In Progress (MIP) list. Superior Usability. no opt-in, no codes, no downloads, no authenticator apps. Better Security.",
5
5
  "keywords" : [ "ideem", "zsm", "zsm-client-sdk", "umfaclient", "fido2client", "library", "umfa", "fido", "fido2", "client", "javascript", "multifactor", "multi-factor", "webauthn", "authentication", "security", "cryptography", "mpc", "fips", "nist", "mip", "passkeys" ],
6
6
  "author" : "Jason Jurusz <jj@useideem.com>",