cidaas-javascript-sdk 3.0.5 → 3.1.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/CHANGELOG.md +3 -2
- package/README.md +35 -5
- package/package.json +19 -8
- package/src/main/web-auth/ConsentService.ts +7 -29
- package/src/main/web-auth/Entities.ts +9 -44
- package/src/main/web-auth/Helper.ts +4 -4
- package/src/main/web-auth/TokenService.ts +31 -127
- package/src/main/web-auth/UserService.ts +25 -160
- package/src/main/web-auth/VerificationService.ts +16 -36
- package/src/main/web-auth/WebAuth.ts +64 -237
- package/types/main/authentication/index.d.ts +0 -55
- package/types/main/authentication/index.js +0 -262
- package/types/main/index.d.ts +0 -4
- package/types/main/index.js +0 -9
- package/types/main/web-auth/ConsentService.d.ts +0 -59
- package/types/main/web-auth/ConsentService.js +0 -97
- package/types/main/web-auth/Entities.d.ts +0 -567
- package/types/main/web-auth/Entities.js +0 -76
- package/types/main/web-auth/Helper.d.ts +0 -24
- package/types/main/web-auth/Helper.js +0 -89
- package/types/main/web-auth/LoginService.d.ts +0 -103
- package/types/main/web-auth/LoginService.js +0 -248
- package/types/main/web-auth/TokenService.d.ts +0 -48
- package/types/main/web-auth/TokenService.js +0 -217
- package/types/main/web-auth/UserService.d.ts +0 -143
- package/types/main/web-auth/UserService.js +0 -458
- package/types/main/web-auth/VerificationService.d.ts +0 -125
- package/types/main/web-auth/VerificationService.js +0 -273
- package/types/main/web-auth/WebAuth.d.ts +0 -886
- package/types/main/web-auth/WebAuth.js +0 -1754
|
@@ -17,29 +17,11 @@ export namespace UserService {
|
|
|
17
17
|
* @returns
|
|
18
18
|
*/
|
|
19
19
|
export function getUserProfile(options: { access_token: string }) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var http = new XMLHttpRequest();
|
|
26
|
-
var _serviceURL = window.webAuthSettings.authority + "/users-srv/userinfo";
|
|
27
|
-
http.onreadystatechange = function () {
|
|
28
|
-
if (http.readyState == 4) {
|
|
29
|
-
resolve(JSON.parse(http.responseText));
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
http.open("GET", _serviceURL, true);
|
|
33
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
34
|
-
http.setRequestHeader("Authorization", `Bearer ${options.access_token}`);
|
|
35
|
-
if (window.localeSettings) {
|
|
36
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
37
|
-
}
|
|
38
|
-
http.send();
|
|
39
|
-
} catch (ex) {
|
|
40
|
-
reject(ex);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
20
|
+
if (!options.access_token) {
|
|
21
|
+
throw new CustomException("access_token cannot be empty", 417);
|
|
22
|
+
}
|
|
23
|
+
const _serviceURL = window.webAuthSettings.authority + "/users-srv/userinfo";
|
|
24
|
+
return Helper.createPostPromise(undefined, _serviceURL, undefined, "GET", options.access_token);
|
|
43
25
|
};
|
|
44
26
|
|
|
45
27
|
/**
|
|
@@ -102,29 +84,8 @@ export namespace UserService {
|
|
|
102
84
|
* @returns
|
|
103
85
|
*/
|
|
104
86
|
export function getInviteUserDetails(options: { invite_id: string }) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
var http = new XMLHttpRequest();
|
|
108
|
-
var _serviceURL = window.webAuthSettings.authority + "/users-srv/invite/info/" + options.invite_id;
|
|
109
|
-
http.onreadystatechange = function () {
|
|
110
|
-
if (http.readyState == 4) {
|
|
111
|
-
if (http.responseText) {
|
|
112
|
-
resolve(JSON.parse(http.responseText));
|
|
113
|
-
} else {
|
|
114
|
-
resolve(false);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
http.open("GET", _serviceURL, true);
|
|
119
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
120
|
-
if (window.localeSettings) {
|
|
121
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
122
|
-
}
|
|
123
|
-
http.send();
|
|
124
|
-
} catch (ex) {
|
|
125
|
-
reject(ex);
|
|
126
|
-
}
|
|
127
|
-
});
|
|
87
|
+
const _serviceURL = window.webAuthSettings.authority + "/users-srv/invite/info/" + options.invite_id;
|
|
88
|
+
return Helper.createPostPromise(undefined, _serviceURL, false, "GET");
|
|
128
89
|
};
|
|
129
90
|
|
|
130
91
|
/**
|
|
@@ -168,7 +129,7 @@ export namespace UserService {
|
|
|
168
129
|
*/
|
|
169
130
|
export function initiateResetPassword(options: ResetPasswordEntity) {
|
|
170
131
|
var _serviceURL = window.webAuthSettings.authority + "/users-srv/resetpassword/initiate";
|
|
171
|
-
return Helper.createPostPromise(options, _serviceURL, false);
|
|
132
|
+
return Helper.createPostPromise(options, _serviceURL, false, "POST");
|
|
172
133
|
};
|
|
173
134
|
|
|
174
135
|
/**
|
|
@@ -183,25 +144,7 @@ export namespace UserService {
|
|
|
183
144
|
document.body.appendChild(form);
|
|
184
145
|
form.submit();
|
|
185
146
|
} else {
|
|
186
|
-
return
|
|
187
|
-
try {
|
|
188
|
-
var http = new XMLHttpRequest();
|
|
189
|
-
http.onreadystatechange = function () {
|
|
190
|
-
if (http.readyState == 4) {
|
|
191
|
-
if (http.responseText) {
|
|
192
|
-
resolve(JSON.parse(http.responseText));
|
|
193
|
-
} else {
|
|
194
|
-
resolve(false);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
http.open("POST", url, true);
|
|
199
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
200
|
-
http.send(JSON.stringify(options));
|
|
201
|
-
} catch (ex) {
|
|
202
|
-
reject(ex);
|
|
203
|
-
}
|
|
204
|
-
});
|
|
147
|
+
return Helper.createPostPromise(options, url, false, "POST");
|
|
205
148
|
}
|
|
206
149
|
} catch (ex) {
|
|
207
150
|
throw new CustomException(ex, 417);
|
|
@@ -220,25 +163,7 @@ export namespace UserService {
|
|
|
220
163
|
document.body.appendChild(form);
|
|
221
164
|
form.submit();
|
|
222
165
|
} else {
|
|
223
|
-
return
|
|
224
|
-
try {
|
|
225
|
-
var http = new XMLHttpRequest();
|
|
226
|
-
http.onreadystatechange = function () {
|
|
227
|
-
if (http.readyState == 4) {
|
|
228
|
-
if (http.responseText) {
|
|
229
|
-
resolve(JSON.parse(http.responseText));
|
|
230
|
-
} else {
|
|
231
|
-
resolve(false);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
http.open("POST", url, true);
|
|
236
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
237
|
-
http.send(JSON.stringify(options));
|
|
238
|
-
} catch (ex) {
|
|
239
|
-
reject(ex);
|
|
240
|
-
}
|
|
241
|
-
});
|
|
166
|
+
return Helper.createPostPromise(options, url, false, "POST");
|
|
242
167
|
}
|
|
243
168
|
} catch (ex) {
|
|
244
169
|
throw new CustomException(ex, 417);
|
|
@@ -251,29 +176,8 @@ export namespace UserService {
|
|
|
251
176
|
* @returns
|
|
252
177
|
*/
|
|
253
178
|
export function getDeduplicationDetails(options: { trackId: string }) {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
var http = new XMLHttpRequest();
|
|
257
|
-
var _serviceURL = window.webAuthSettings.authority + "/users-srv/deduplication/info/" + options.trackId;
|
|
258
|
-
http.onreadystatechange = function () {
|
|
259
|
-
if (http.readyState == 4) {
|
|
260
|
-
if (http.responseText) {
|
|
261
|
-
resolve(JSON.parse(http.responseText));
|
|
262
|
-
} else {
|
|
263
|
-
resolve(false);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
};
|
|
267
|
-
http.open("GET", _serviceURL, true);
|
|
268
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
269
|
-
if (window.localeSettings) {
|
|
270
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
271
|
-
}
|
|
272
|
-
http.send();
|
|
273
|
-
} catch (ex) {
|
|
274
|
-
reject(ex);
|
|
275
|
-
}
|
|
276
|
-
});
|
|
179
|
+
const _serviceURL = window.webAuthSettings.authority + "/users-srv/deduplication/info/" + options.trackId;
|
|
180
|
+
return Helper.createPostPromise(options, _serviceURL, false, "GET", undefined);
|
|
277
181
|
};
|
|
278
182
|
|
|
279
183
|
/**
|
|
@@ -298,25 +202,8 @@ export namespace UserService {
|
|
|
298
202
|
* @returns
|
|
299
203
|
*/
|
|
300
204
|
export function registerDeduplication(options: { trackId: string }) {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
var http = new XMLHttpRequest();
|
|
304
|
-
var _serviceURL = window.webAuthSettings.authority + "/users-srv/deduplication/register/" + options.trackId;
|
|
305
|
-
http.onreadystatechange = function () {
|
|
306
|
-
if (http.readyState == 4) {
|
|
307
|
-
resolve(JSON.parse(http.responseText));
|
|
308
|
-
}
|
|
309
|
-
};
|
|
310
|
-
http.open("POST", _serviceURL, true);
|
|
311
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
312
|
-
if (window.localeSettings) {
|
|
313
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
314
|
-
}
|
|
315
|
-
http.send();
|
|
316
|
-
} catch (ex) {
|
|
317
|
-
reject(ex);
|
|
318
|
-
}
|
|
319
|
-
});
|
|
205
|
+
const _serviceURL = window.webAuthSettings.authority + "/users-srv/deduplication/register/" + options.trackId;
|
|
206
|
+
return Helper.createPostPromise(undefined, _serviceURL, undefined, "POST");
|
|
320
207
|
};
|
|
321
208
|
|
|
322
209
|
/**
|
|
@@ -327,7 +214,7 @@ export namespace UserService {
|
|
|
327
214
|
*/
|
|
328
215
|
export function changePassword(options: ChangePasswordEntity, access_token: string) {
|
|
329
216
|
var _serviceURL = window.webAuthSettings.authority + "/users-srv/changepassword";
|
|
330
|
-
return Helper.createPostPromise(options, _serviceURL, false, access_token);
|
|
217
|
+
return Helper.createPostPromise(options, _serviceURL, false, "POST", access_token);
|
|
331
218
|
};
|
|
332
219
|
|
|
333
220
|
/**
|
|
@@ -338,30 +225,8 @@ export namespace UserService {
|
|
|
338
225
|
* @returns
|
|
339
226
|
*/
|
|
340
227
|
export function updateProfile(options: UserEntity, access_token: string, sub: string) {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
var http = new XMLHttpRequest();
|
|
344
|
-
var _serviceURL = window.webAuthSettings.authority + "/users-srv/user/profile/" + sub;
|
|
345
|
-
http.onreadystatechange = function () {
|
|
346
|
-
if (http.readyState == 4) {
|
|
347
|
-
if (http.responseText) {
|
|
348
|
-
resolve(JSON.parse(http.responseText));
|
|
349
|
-
} else {
|
|
350
|
-
resolve(false);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
};
|
|
354
|
-
http.open("PUT", _serviceURL, true);
|
|
355
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
356
|
-
http.setRequestHeader("Authorization", `Bearer ${access_token}`);
|
|
357
|
-
if (window.localeSettings) {
|
|
358
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
359
|
-
}
|
|
360
|
-
http.send(JSON.stringify(options));
|
|
361
|
-
} catch (ex) {
|
|
362
|
-
throw new CustomException(ex, 417);
|
|
363
|
-
}
|
|
364
|
-
});
|
|
228
|
+
const _serviceURL = window.webAuthSettings.authority + "/users-srv/user/profile/" + sub;
|
|
229
|
+
return Helper.createPostPromise(options, _serviceURL, false, "PUT", access_token);
|
|
365
230
|
};
|
|
366
231
|
|
|
367
232
|
/**
|
|
@@ -373,7 +238,7 @@ export namespace UserService {
|
|
|
373
238
|
export function initiateLinkAccount(options: IUserLinkEntity, access_token: string) {
|
|
374
239
|
options.user_name_type = 'email';
|
|
375
240
|
var _serviceURL = window.webAuthSettings.authority + "/users-srv/user/link/initiate";
|
|
376
|
-
return Helper.createPostPromise(options, _serviceURL, false, access_token);
|
|
241
|
+
return Helper.createPostPromise(options, _serviceURL, false, "POST", access_token);
|
|
377
242
|
};
|
|
378
243
|
|
|
379
244
|
/**
|
|
@@ -384,7 +249,7 @@ export namespace UserService {
|
|
|
384
249
|
*/
|
|
385
250
|
export function completeLinkAccount(options: { code?: string; link_request_id?: string; }, access_token: string) {
|
|
386
251
|
var _serviceURL = window.webAuthSettings.authority + "/users-srv/user/link/complete";
|
|
387
|
-
return Helper.createPostPromise(options, _serviceURL, false, access_token);
|
|
252
|
+
return Helper.createPostPromise(options, _serviceURL, false, "POST", access_token);
|
|
388
253
|
};
|
|
389
254
|
|
|
390
255
|
/**
|
|
@@ -395,7 +260,7 @@ export namespace UserService {
|
|
|
395
260
|
*/
|
|
396
261
|
export function getLinkedUsers(access_token: string, sub: string) {
|
|
397
262
|
var _serviceURL = window.webAuthSettings.authority + "/users-srv/userinfo/social/" + sub;
|
|
398
|
-
return Helper.createPostPromise(undefined, _serviceURL, false, access_token);
|
|
263
|
+
return Helper.createPostPromise(undefined, _serviceURL, false, "POST", access_token);
|
|
399
264
|
};
|
|
400
265
|
|
|
401
266
|
/**
|
|
@@ -406,7 +271,7 @@ export namespace UserService {
|
|
|
406
271
|
*/
|
|
407
272
|
export function unlinkAccount(access_token: string, identityId: string) {
|
|
408
273
|
var _serviceURL = window.webAuthSettings.authority + "/users-srv/user/unlink/" + identityId;
|
|
409
|
-
return Helper.createPostPromise(undefined, _serviceURL, false, access_token);
|
|
274
|
+
return Helper.createPostPromise(undefined, _serviceURL, false, "POST", access_token);
|
|
410
275
|
};
|
|
411
276
|
|
|
412
277
|
/**
|
|
@@ -416,17 +281,17 @@ export namespace UserService {
|
|
|
416
281
|
*/
|
|
417
282
|
export function deleteUserAccount(options: { access_token: string, sub: string }) {
|
|
418
283
|
var _serviceURL = window.webAuthSettings.authority + "/users-srv/user/unregister/scheduler/schedule/" + options.sub;
|
|
419
|
-
return Helper.createPostPromise(options, _serviceURL, undefined, options.access_token);
|
|
284
|
+
return Helper.createPostPromise(options, _serviceURL, undefined, "POST", options.access_token);
|
|
420
285
|
};
|
|
421
286
|
|
|
422
287
|
|
|
423
288
|
/**
|
|
424
|
-
* check if an user exists
|
|
289
|
+
* check if an user exists from users-actions-srv
|
|
425
290
|
* @param options
|
|
426
291
|
* @returns
|
|
427
292
|
*/
|
|
428
293
|
export function userCheckExists(options: FindUserEntity) {
|
|
429
|
-
var _serviceURL = window.webAuthSettings.authority + "/
|
|
430
|
-
return Helper.createPostPromise(options, _serviceURL, undefined);
|
|
294
|
+
var _serviceURL = window.webAuthSettings.authority + "/useractions-srv/userexistence/" + options.requestId + "?webfinger=" + options.webfinger + "&rememberMe=" + options.rememberMe;
|
|
295
|
+
return Helper.createPostPromise(options, _serviceURL, undefined, "POST");
|
|
431
296
|
};
|
|
432
297
|
}
|
|
@@ -60,7 +60,7 @@ export namespace VerificationService {
|
|
|
60
60
|
code: string;
|
|
61
61
|
}) {
|
|
62
62
|
var _serviceURL = window.webAuthSettings.authority + "/verification-srv/account/verify";
|
|
63
|
-
return Helper.createPostPromise(options, _serviceURL, false);
|
|
63
|
+
return Helper.createPostPromise(options, _serviceURL, false,"POST");
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
/**
|
|
@@ -70,7 +70,7 @@ export namespace VerificationService {
|
|
|
70
70
|
*/
|
|
71
71
|
export function getMFAListV2(options: IConfiguredListRequestEntity) {
|
|
72
72
|
var _serviceURL = window.webAuthSettings.authority + "/verification-srv/v2/setup/public/configured/list";
|
|
73
|
-
return Helper.createPostPromise(options, _serviceURL, false);
|
|
73
|
+
return Helper.createPostPromise(options, _serviceURL, false,"POST");
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
/**
|
|
@@ -84,7 +84,7 @@ export namespace VerificationService {
|
|
|
84
84
|
type: string;
|
|
85
85
|
}) {
|
|
86
86
|
var _serviceURL = window.webAuthSettings.authority + "/verification-srv/v2/setup/cancel/" + options.type;
|
|
87
|
-
return Helper.createPostPromise(options, _serviceURL, undefined);
|
|
87
|
+
return Helper.createPostPromise(options, _serviceURL, undefined,"POST");
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
/**
|
|
@@ -92,28 +92,8 @@ export namespace VerificationService {
|
|
|
92
92
|
* @returns
|
|
93
93
|
*/
|
|
94
94
|
export function getAllVerificationList(access_token: string) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
var http = new XMLHttpRequest();
|
|
98
|
-
http.onreadystatechange = function () {
|
|
99
|
-
if (http.readyState == 4) {
|
|
100
|
-
if (http.responseText) {
|
|
101
|
-
resolve(JSON.parse(http.responseText));
|
|
102
|
-
} else {
|
|
103
|
-
resolve(undefined);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
http.open("GET", `${window.webAuthSettings.authority}/verification-srv/config/list`, true);
|
|
108
|
-
http.setRequestHeader("Authorization", `Bearer ${access_token}`);
|
|
109
|
-
if (window.localeSettings) {
|
|
110
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
111
|
-
}
|
|
112
|
-
http.send();
|
|
113
|
-
} catch (ex) {
|
|
114
|
-
reject(ex);
|
|
115
|
-
}
|
|
116
|
-
});
|
|
95
|
+
const _serviceURL = `${window.webAuthSettings.authority}/verification-srv/config/list`;
|
|
96
|
+
return Helper.createPostPromise(undefined, _serviceURL,undefined, "GET", access_token);
|
|
117
97
|
};
|
|
118
98
|
|
|
119
99
|
/**
|
|
@@ -123,7 +103,7 @@ export namespace VerificationService {
|
|
|
123
103
|
*/
|
|
124
104
|
export function enrollVerification(options: IEnrollVerificationSetupRequestEntity) {
|
|
125
105
|
var _serviceURL = window.webAuthSettings.authority + "/verification-srv/v2/setup/enroll/" + options.verification_type;
|
|
126
|
-
return Helper.createPostPromise(options, _serviceURL, undefined);
|
|
106
|
+
return Helper.createPostPromise(options, _serviceURL, undefined,"POST");
|
|
127
107
|
};
|
|
128
108
|
|
|
129
109
|
/**
|
|
@@ -133,7 +113,7 @@ export namespace VerificationService {
|
|
|
133
113
|
*/
|
|
134
114
|
export function updateSocket(status_id: string) {
|
|
135
115
|
var _serviceURL = window.webAuthSettings.authority + "/verification-srv/v2/notification/status/" + status_id;
|
|
136
|
-
return Helper.createPostPromise(undefined, _serviceURL, undefined);
|
|
116
|
+
return Helper.createPostPromise(undefined, _serviceURL, undefined,"POST");
|
|
137
117
|
};
|
|
138
118
|
|
|
139
119
|
/**
|
|
@@ -143,7 +123,7 @@ export namespace VerificationService {
|
|
|
143
123
|
*/
|
|
144
124
|
export function updateStatus(status_id: string) {
|
|
145
125
|
var _serviceURL = window.webAuthSettings.authority + "/verification-srv/v2/notification/status/" + status_id;
|
|
146
|
-
return Helper.createPostPromise(undefined, _serviceURL, undefined);
|
|
126
|
+
return Helper.createPostPromise(undefined, _serviceURL, undefined,"POST");
|
|
147
127
|
};
|
|
148
128
|
|
|
149
129
|
/**
|
|
@@ -153,7 +133,7 @@ export namespace VerificationService {
|
|
|
153
133
|
*/
|
|
154
134
|
export function setupFidoVerification(options: FidoSetupEntity) {
|
|
155
135
|
var _serviceURL = window.webAuthSettings.authority + "/verification-srv/v2/setup/initiate/suggestmfa/" + options.verification_type;
|
|
156
|
-
return Helper.createPostPromise(options, _serviceURL, undefined);
|
|
136
|
+
return Helper.createPostPromise(options, _serviceURL, undefined,"POST");
|
|
157
137
|
};
|
|
158
138
|
|
|
159
139
|
/**
|
|
@@ -163,7 +143,7 @@ export namespace VerificationService {
|
|
|
163
143
|
*/
|
|
164
144
|
export function checkVerificationTypeConfigured(options: IConfiguredListRequestEntity) {
|
|
165
145
|
var _serviceURL = window.webAuthSettings.authority + "/verification-srv/v2/setup/public/configured/check/" + options.verification_type;
|
|
166
|
-
return Helper.createPostPromise(options, _serviceURL, undefined);
|
|
146
|
+
return Helper.createPostPromise(options, _serviceURL, undefined,"POST");
|
|
167
147
|
};
|
|
168
148
|
|
|
169
149
|
/**
|
|
@@ -173,7 +153,7 @@ export namespace VerificationService {
|
|
|
173
153
|
*/
|
|
174
154
|
export function initiateMFAV2(options: IInitVerificationAuthenticationRequestEntity) {
|
|
175
155
|
var _serviceURL = window.webAuthSettings.authority + "/verification-srv/v2/authenticate/initiate/" + options.type;
|
|
176
|
-
return Helper.createPostPromise(options, _serviceURL, false);
|
|
156
|
+
return Helper.createPostPromise(options, _serviceURL, false,"POST");
|
|
177
157
|
};
|
|
178
158
|
|
|
179
159
|
/**
|
|
@@ -184,7 +164,7 @@ export namespace VerificationService {
|
|
|
184
164
|
*/
|
|
185
165
|
export function initiateMfaV1(options: any, verificationType: string) {
|
|
186
166
|
var _serviceURL = window.webAuthSettings.authority + "/verification-srv/" + verificationType.toLowerCase() + "/initiate";
|
|
187
|
-
return Helper.createPostPromise(options, _serviceURL, false);
|
|
167
|
+
return Helper.createPostPromise(options, _serviceURL, false,"POST");
|
|
188
168
|
}
|
|
189
169
|
|
|
190
170
|
/**
|
|
@@ -194,7 +174,7 @@ export namespace VerificationService {
|
|
|
194
174
|
*/
|
|
195
175
|
export function authenticateMFAV2(options: IAuthVerificationAuthenticationRequestEntity) {
|
|
196
176
|
var _serviceURL = window.webAuthSettings.authority + "/verification-srv/v2/authenticate/authenticate/" + options.type;
|
|
197
|
-
return Helper.createPostPromise(options, _serviceURL, undefined);
|
|
177
|
+
return Helper.createPostPromise(options, _serviceURL, undefined,"POST");
|
|
198
178
|
};
|
|
199
179
|
|
|
200
180
|
/**
|
|
@@ -238,7 +218,7 @@ export namespace VerificationService {
|
|
|
238
218
|
*/
|
|
239
219
|
export function setupVerificationV1(options: any, access_token: string, verificationType: string) {
|
|
240
220
|
var _serviceURL = window.webAuthSettings.authority + "/verification-srv/" + verificationType.toLowerCase() + "/setup";
|
|
241
|
-
return Helper.createPostPromise(options, _serviceURL, false, access_token);
|
|
221
|
+
return Helper.createPostPromise(options, _serviceURL, false,"POST", access_token);
|
|
242
222
|
}
|
|
243
223
|
|
|
244
224
|
/**
|
|
@@ -251,7 +231,7 @@ export namespace VerificationService {
|
|
|
251
231
|
*/
|
|
252
232
|
export function enrollVerificationV1(options: any, access_token: string, verificationType: string) {
|
|
253
233
|
var _serviceURL = window.webAuthSettings.authority + "/verification-srv/" + verificationType.toLowerCase() + "/enroll";
|
|
254
|
-
return Helper.createPostPromise(options, _serviceURL, false, access_token);
|
|
234
|
+
return Helper.createPostPromise(options, _serviceURL, false,"POST", access_token);
|
|
255
235
|
}
|
|
256
236
|
|
|
257
237
|
/**
|
|
@@ -262,6 +242,6 @@ export namespace VerificationService {
|
|
|
262
242
|
*/
|
|
263
243
|
export function authenticateMfaV1(options: any, verificationType: string) {
|
|
264
244
|
var _serviceURL = window.webAuthSettings.authority + "/verification-srv/" + verificationType.toLowerCase() + "/authenticate";
|
|
265
|
-
return Helper.createPostPromise(options, _serviceURL, false);
|
|
245
|
+
return Helper.createPostPromise(options, _serviceURL, false,"POST");
|
|
266
246
|
}
|
|
267
247
|
}
|