@ideem/zsm-client-sdk 2.7.0 → 2.8.0
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/CHANGELOG.md +33 -1
- package/ErrorHandler.js +1 -1
- package/FIDO2ClientBase.js +248 -29
- package/PKPUtils.js +61 -0
- package/PasskeysPlusClient.js +120 -0
- package/PluginManager.js +1 -1
- package/RelyingPartyBase.js +157 -6
- package/UMFAClientBase.js +269 -51
- package/WASMRustInterface.js +1332 -1286
- package/WebAuthnClientBase.js +447 -129
- package/ZSMClientSDK.js +6 -1
- package/encodeUserIdentifier.js +17 -0
- package/package.json +13 -12
package/ZSMClientSDK.js
CHANGED
|
@@ -4,6 +4,8 @@ import {FIDO2Client as FIDO2ClientCore} from './FIDO2Client.js';
|
|
|
4
4
|
import RelyingParty from './RelyingParty.js';
|
|
5
5
|
import WebAuthnClient from './WebAuthnClient.js';
|
|
6
6
|
import {zsmPluginManager} from './PluginManager.js';
|
|
7
|
+
import GLOBAL from './GlobalScoping.js';
|
|
8
|
+
|
|
7
9
|
|
|
8
10
|
class UMFAClient {
|
|
9
11
|
constructor(config) {
|
|
@@ -35,4 +37,7 @@ zsmPluginManager.registerPlugin('Core', {
|
|
|
35
37
|
mode: 'OVERRIDE'
|
|
36
38
|
});
|
|
37
39
|
|
|
38
|
-
|
|
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 };
|
|
@@ -0,0 +1,17 @@
|
|
|
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 };
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name" : "@ideem/zsm-client-sdk",
|
|
3
|
-
"version" : "2.
|
|
3
|
+
"version" : "2.8.0",
|
|
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
|
-
"author" : "Jason Jurusz <jj@useideem.com>",
|
|
6
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
|
+
"author" : "Jason Jurusz <jj@useideem.com>",
|
|
7
7
|
"type" : "module",
|
|
8
8
|
"main" : "./ZSMClientSDK.js",
|
|
9
9
|
"exports" : {
|
|
@@ -11,16 +11,11 @@
|
|
|
11
11
|
"./*" : "./*.js",
|
|
12
12
|
"./*.js" : "./*.js"
|
|
13
13
|
},
|
|
14
|
-
|
|
15
14
|
"scripts" : {
|
|
16
15
|
"start" : "echo 'This is the Ideem SDK library, not a freestanding application. There is no start script defined. To use, import the library into a browser application.' 1>&2",
|
|
17
16
|
"showVersion" : "echo \"$(npm pkg get name | tr -d \\\") current version: $(npm pkg get version | tr -d \\\")\""
|
|
18
17
|
},
|
|
19
|
-
"collaborators" : [
|
|
20
|
-
"Joel Teply <joel@useideem.com>",
|
|
21
|
-
"Todd Decker <todd@useideem.com>",
|
|
22
|
-
"Brian Koziel <brian@useideem.com>"
|
|
23
|
-
],
|
|
18
|
+
"collaborators" : ["Brian Koziel <brian@useideem.com>", "Todd Decker <todd@useideem.com>","Joel Teply <joel@useideem.com>"],
|
|
24
19
|
"license" : "LicenseRef-Ideem",
|
|
25
20
|
"repository" : {
|
|
26
21
|
"type" : "git",
|
|
@@ -30,12 +25,18 @@
|
|
|
30
25
|
"bugs" : "https://github.com/useideem/vHSM/issues",
|
|
31
26
|
"files" : [
|
|
32
27
|
"./shims/",
|
|
28
|
+
"./CHANGELOG.md",
|
|
29
|
+
"./LICENSE",
|
|
30
|
+
"./README.md",
|
|
31
|
+
"./encodeUserIdentifier.js",
|
|
33
32
|
"./ErrorHandler.js",
|
|
34
33
|
"./EventCoordinator.js",
|
|
35
34
|
"./FIDO2Client.js",
|
|
36
35
|
"./FIDO2ClientBase.js",
|
|
37
36
|
"./GlobalScoping.js",
|
|
38
37
|
"./IdentityIndexing.js",
|
|
38
|
+
"./PKPUtils.js",
|
|
39
|
+
"./PasskeysPlusClient.js",
|
|
39
40
|
"./PluginManager.js",
|
|
40
41
|
"./RelyingParty.js",
|
|
41
42
|
"./RelyingPartyBase.js",
|
|
@@ -45,17 +46,17 @@
|
|
|
45
46
|
"./WASMRustInterface.js",
|
|
46
47
|
"./WebAuthnClient.js",
|
|
47
48
|
"./WebAuthnClientBase.js",
|
|
48
|
-
"./ZSMClientSDK.js"
|
|
49
|
-
"./CHANGELOG.md",
|
|
50
|
-
"./LICENSE",
|
|
51
|
-
"./README.md"
|
|
49
|
+
"./ZSMClientSDK.js"
|
|
52
50
|
],
|
|
53
51
|
"sideEffects" : [
|
|
52
|
+
"./encodeUserIdentifier.js",
|
|
54
53
|
"./EventCoordinator.js",
|
|
55
54
|
"./FIDO2Client.js",
|
|
56
55
|
"./FIDO2ClientBase.js",
|
|
57
56
|
"./GlobalScoping.js",
|
|
58
57
|
"./IdentityIndexing.js",
|
|
58
|
+
"./PKPUtils.js",
|
|
59
|
+
"./PasskeysPlusClient.js",
|
|
59
60
|
"./PluginManager.js",
|
|
60
61
|
"./RelyingParty.js",
|
|
61
62
|
"./RelyingPartyBase.js",
|