cidaas-javascript-sdk 5.1.2 → 5.1.3
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
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
## [5.1.
|
|
1
|
+
## [5.1.3](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/compare/v5.1.2...v5.1.3) (2026-02-26)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* backward-compatible SDK fixes for parsing, promises, and types ([1559fae](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/1559fae00611cba245850439fb2723bf59c44242))
|
|
7
|
+
* update changelog ([630af23](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/630af23a235aa0820a259f42eecdc3ac7615bdec))
|
|
7
8
|
|
|
8
9
|
# Changelog
|
|
9
10
|
|
|
10
|
-
## V5.1.
|
|
11
|
+
## V5.1.3
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- backward-compatible SDK fixes for parsing, promises, and types
|
|
15
|
+
|
|
16
|
+
## V5.1.2
|
|
11
17
|
|
|
12
18
|
### Fixed
|
|
13
19
|
- api adjustments for initiateAccountVerification(), verifyAccount(), getAllVerificationList(), initiateMFA(), authenticateMFA()
|
package/dist/common/Helper.js
CHANGED
|
@@ -36,10 +36,18 @@ class Helper {
|
|
|
36
36
|
return new Promise((resolve, reject) => {
|
|
37
37
|
try {
|
|
38
38
|
const http = new XMLHttpRequest();
|
|
39
|
+
http.onerror = function () {
|
|
40
|
+
reject(new Error("Network request failed"));
|
|
41
|
+
};
|
|
39
42
|
http.onreadystatechange = function () {
|
|
40
43
|
if (http.readyState == 4) {
|
|
41
44
|
if (http.responseText) {
|
|
42
|
-
|
|
45
|
+
try {
|
|
46
|
+
resolve(JSON.parse(http.responseText));
|
|
47
|
+
}
|
|
48
|
+
catch (parseError) {
|
|
49
|
+
reject(parseError instanceof Error ? parseError : new Error(String(parseError)));
|
|
50
|
+
}
|
|
43
51
|
}
|
|
44
52
|
else {
|
|
45
53
|
resolve(errorResolver);
|
|
@@ -93,7 +101,7 @@ class Helper {
|
|
|
93
101
|
try {
|
|
94
102
|
userManager.getUser().then((user) => {
|
|
95
103
|
resolve(user === null || user === void 0 ? void 0 : user.access_token);
|
|
96
|
-
});
|
|
104
|
+
}).catch(reject);
|
|
97
105
|
}
|
|
98
106
|
catch (ex) {
|
|
99
107
|
reject(ex);
|
|
@@ -84,7 +84,7 @@ export interface EnrollVerificationRequest {
|
|
|
84
84
|
device_id?: string;
|
|
85
85
|
/** unique identifier of client app, can be found in app setting under admin ui */
|
|
86
86
|
client_id?: string;
|
|
87
|
-
/** code to
|
|
87
|
+
/** code to authenticate */
|
|
88
88
|
pass_code?: string;
|
|
89
89
|
}
|
|
90
90
|
export interface CheckVerificationTypeConfiguredRequest extends GetMFAListRequest {
|
|
@@ -121,7 +121,7 @@ export interface AuthenticateMFARequest {
|
|
|
121
121
|
/** Subject (User) identifier */
|
|
122
122
|
sub?: string;
|
|
123
123
|
/** id generated on Authz request */
|
|
124
|
-
requestId?:
|
|
124
|
+
requestId?: string;
|
|
125
125
|
}
|
|
126
126
|
export interface DeviceInfo {
|
|
127
127
|
/** id of the device */
|
|
@@ -162,7 +162,7 @@ export interface ConfigureFriendlyNameRequest {
|
|
|
162
162
|
id?: string;
|
|
163
163
|
/** physical verification id received from status verification api */
|
|
164
164
|
ph_id?: string;
|
|
165
|
-
/** id
|
|
165
|
+
/** id received from enrollment API */
|
|
166
166
|
device_id?: string;
|
|
167
167
|
/** friendly name for the device */
|
|
168
168
|
friendly_name?: string;
|