cidaas-javascript-sdk 3.0.5 → 3.1.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 +35 -2
- package/README.md +1 -1
- package/package.json +19 -8
- package/src/main/web-auth/ConsentService.ts +7 -29
- package/src/main/web-auth/Entities.ts +0 -43
- package/src/main/web-auth/Helper.ts +4 -4
- package/src/main/web-auth/TokenService.ts +31 -126
- package/src/main/web-auth/UserService.ts +23 -158
- package/src/main/web-auth/VerificationService.ts +16 -36
- package/src/main/web-auth/WebAuth.ts +38 -214
- package/types/main/web-auth/ConsentService.js +7 -31
- package/types/main/web-auth/Entities.d.ts +0 -41
- package/types/main/web-auth/Helper.d.ts +3 -3
- package/types/main/web-auth/Helper.js +4 -4
- package/types/main/web-auth/TokenService.js +31 -134
- package/types/main/web-auth/UserService.js +25 -172
- package/types/main/web-auth/VerificationService.js +16 -38
- package/types/main/web-auth/WebAuth.d.ts +4 -4
- package/types/main/web-auth/WebAuth.js +48 -246
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { UserManager, UserManagerSettings } from "oidc-client-ts";
|
|
2
2
|
import * as CryptoJS from 'crypto-js';
|
|
3
|
-
import fingerprint from '@fingerprintjs/fingerprintjs';
|
|
4
3
|
|
|
5
4
|
import { Authentication } from "../authentication";
|
|
6
5
|
import { Helper, CustomException } from "./Helper";
|
|
@@ -235,9 +234,9 @@ export class WebAuth {
|
|
|
235
234
|
var loginURL = "";
|
|
236
235
|
window.usermanager._client.createSigninRequest(settings).then((signInRequest: any) => {
|
|
237
236
|
loginURL = signInRequest.url;
|
|
238
|
-
})
|
|
237
|
+
})
|
|
239
238
|
var timeRemaining = 5000
|
|
240
|
-
while(timeRemaining > 0) {
|
|
239
|
+
while (timeRemaining > 0) {
|
|
241
240
|
if (loginURL) {
|
|
242
241
|
break;
|
|
243
242
|
}
|
|
@@ -300,29 +299,8 @@ export class WebAuth {
|
|
|
300
299
|
* @returns
|
|
301
300
|
*/
|
|
302
301
|
getMissingFields(options: { requestId: string; trackId: string; }) {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
var http = new XMLHttpRequest();
|
|
306
|
-
var _serviceURL = window.webAuthSettings.authority + "/public-srv/public/trackinfo/" + options.requestId + "/" + options.trackId;
|
|
307
|
-
http.onreadystatechange = function () {
|
|
308
|
-
if (http.readyState == 4) {
|
|
309
|
-
if (http.responseText) {
|
|
310
|
-
resolve(JSON.parse(http.responseText));
|
|
311
|
-
} else {
|
|
312
|
-
resolve(false);
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
|
-
http.open("GET", _serviceURL, true);
|
|
317
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
318
|
-
if (window.localeSettings) {
|
|
319
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
320
|
-
}
|
|
321
|
-
http.send();
|
|
322
|
-
} catch (ex) {
|
|
323
|
-
reject(ex);
|
|
324
|
-
}
|
|
325
|
-
});
|
|
302
|
+
const _serviceURL = window.webAuthSettings.authority + "/public-srv/public/trackinfo/" + options.requestId + "/" + options.trackId;
|
|
303
|
+
return Helper.createPostPromise(undefined, _serviceURL,false, "GET");
|
|
326
304
|
};
|
|
327
305
|
|
|
328
306
|
/**
|
|
@@ -330,29 +308,8 @@ export class WebAuth {
|
|
|
330
308
|
* @returns
|
|
331
309
|
*/
|
|
332
310
|
getTenantInfo() {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
var http = new XMLHttpRequest();
|
|
336
|
-
var _serviceURL = window.webAuthSettings.authority + "/public-srv/tenantinfo/basic";
|
|
337
|
-
http.onreadystatechange = function () {
|
|
338
|
-
if (http.readyState == 4) {
|
|
339
|
-
if (http.responseText) {
|
|
340
|
-
resolve(JSON.parse(http.responseText));
|
|
341
|
-
} else {
|
|
342
|
-
resolve(false);
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
};
|
|
346
|
-
http.open("GET", _serviceURL, true);
|
|
347
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
348
|
-
if (window.localeSettings) {
|
|
349
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
350
|
-
}
|
|
351
|
-
http.send();
|
|
352
|
-
} catch (ex) {
|
|
353
|
-
reject(ex);
|
|
354
|
-
}
|
|
355
|
-
});
|
|
311
|
+
const _serviceURL = window.webAuthSettings.authority + "/public-srv/tenantinfo/basic";
|
|
312
|
+
return Helper.createPostPromise(undefined, _serviceURL,false, "GET");
|
|
356
313
|
};
|
|
357
314
|
|
|
358
315
|
/**
|
|
@@ -373,29 +330,8 @@ export class WebAuth {
|
|
|
373
330
|
* @returns
|
|
374
331
|
*/
|
|
375
332
|
getClientInfo(options: { requestId: string }) {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
var http = new XMLHttpRequest();
|
|
379
|
-
var _serviceURL = window.webAuthSettings.authority + "/public-srv/public/" + options.requestId;
|
|
380
|
-
http.onreadystatechange = function () {
|
|
381
|
-
if (http.readyState == 4) {
|
|
382
|
-
if (http.responseText) {
|
|
383
|
-
resolve(JSON.parse(http.responseText));
|
|
384
|
-
} else {
|
|
385
|
-
resolve(false);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
};
|
|
389
|
-
http.open("GET", _serviceURL, true);
|
|
390
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
391
|
-
if (window.localeSettings) {
|
|
392
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
393
|
-
}
|
|
394
|
-
http.send();
|
|
395
|
-
} catch (ex) {
|
|
396
|
-
reject(ex);
|
|
397
|
-
}
|
|
398
|
-
});
|
|
333
|
+
const _serviceURL = window.webAuthSettings.authority + "/public-srv/public/" + options.requestId;
|
|
334
|
+
return Helper.createPostPromise(undefined, _serviceURL,false, "GET");
|
|
399
335
|
};
|
|
400
336
|
|
|
401
337
|
/**
|
|
@@ -404,33 +340,12 @@ export class WebAuth {
|
|
|
404
340
|
* @returns
|
|
405
341
|
*/
|
|
406
342
|
getDevicesInfo(options: any) {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
if (http.readyState == 4) {
|
|
414
|
-
if (http.responseText) {
|
|
415
|
-
resolve(JSON.parse(http.responseText));
|
|
416
|
-
} else {
|
|
417
|
-
resolve(false);
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
};
|
|
421
|
-
http.open("GET", _serviceURL, true);
|
|
422
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
423
|
-
if (window.localeSettings) {
|
|
424
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
425
|
-
}
|
|
426
|
-
if (window.navigator.userAgent) {
|
|
427
|
-
http.send(JSON.stringify(options));
|
|
428
|
-
}
|
|
429
|
-
http.send();
|
|
430
|
-
} catch (ex) {
|
|
431
|
-
reject(ex);
|
|
432
|
-
}
|
|
433
|
-
});
|
|
343
|
+
options.userAgent = window.navigator.userAgent;
|
|
344
|
+
const _serviceURL = window.webAuthSettings.authority + "/device-srv/devices";
|
|
345
|
+
if (window.navigator.userAgent) {
|
|
346
|
+
return Helper.createPostPromise(options, _serviceURL,false, "GET");
|
|
347
|
+
}
|
|
348
|
+
return Helper.createPostPromise(undefined, _serviceURL,false, "GET");
|
|
434
349
|
};
|
|
435
350
|
|
|
436
351
|
/**
|
|
@@ -439,33 +354,12 @@ export class WebAuth {
|
|
|
439
354
|
* @returns
|
|
440
355
|
*/
|
|
441
356
|
deleteDevice(options: { device_id: string; userAgent?: string }) {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
if (http.readyState == 4) {
|
|
449
|
-
if (http.responseText) {
|
|
450
|
-
resolve(JSON.parse(http.responseText));
|
|
451
|
-
} else {
|
|
452
|
-
resolve(false);
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
};
|
|
456
|
-
http.open("DELETE", _serviceURL, true);
|
|
457
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
458
|
-
if (window.localeSettings) {
|
|
459
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
460
|
-
}
|
|
461
|
-
if (window.navigator.userAgent) {
|
|
462
|
-
http.send(JSON.stringify(options));
|
|
463
|
-
}
|
|
464
|
-
http.send();
|
|
465
|
-
} catch (ex) {
|
|
466
|
-
reject(ex);
|
|
467
|
-
}
|
|
468
|
-
});
|
|
357
|
+
const _serviceURL = window.webAuthSettings.authority + "/device-srv/device/" + options.device_id;
|
|
358
|
+
options.userAgent = window.navigator.userAgent;
|
|
359
|
+
if (window.navigator.userAgent) {
|
|
360
|
+
return Helper.createPostPromise(options, _serviceURL,false, "DELETE");
|
|
361
|
+
}
|
|
362
|
+
return Helper.createPostPromise(undefined, _serviceURL,false, "DELETE");
|
|
469
363
|
};
|
|
470
364
|
|
|
471
365
|
/**
|
|
@@ -510,30 +404,8 @@ export class WebAuth {
|
|
|
510
404
|
* @returns
|
|
511
405
|
*/
|
|
512
406
|
getUnreviewedDevices(access_token: string, sub: string) {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
var http = new XMLHttpRequest();
|
|
516
|
-
var _serviceURL = window.webAuthSettings.authority + "/reports-srv/device/unreviewlist/" + sub;
|
|
517
|
-
http.onreadystatechange = function () {
|
|
518
|
-
if (http.readyState == 4) {
|
|
519
|
-
if (http.responseText) {
|
|
520
|
-
resolve(JSON.parse(http.responseText));
|
|
521
|
-
} else {
|
|
522
|
-
resolve(false);
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
};
|
|
526
|
-
http.open("GET", _serviceURL, true);
|
|
527
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
528
|
-
http.setRequestHeader("Authorization", `Bearer ${access_token}`);
|
|
529
|
-
if (window.localeSettings) {
|
|
530
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
531
|
-
}
|
|
532
|
-
http.send();
|
|
533
|
-
} catch (ex) {
|
|
534
|
-
throw new CustomException(ex, 417);
|
|
535
|
-
}
|
|
536
|
-
});
|
|
407
|
+
let _serviceURL = window.webAuthSettings.authority + "/reports-srv/device/unreviewlist/" + sub;
|
|
408
|
+
return Helper.createPostPromise(undefined, _serviceURL,false, "GET", access_token);
|
|
537
409
|
};
|
|
538
410
|
|
|
539
411
|
/**
|
|
@@ -543,30 +415,8 @@ export class WebAuth {
|
|
|
543
415
|
* @returns
|
|
544
416
|
*/
|
|
545
417
|
getReviewedDevices(access_token: string, sub: string) {
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
var http = new XMLHttpRequest();
|
|
549
|
-
var _serviceURL = window.webAuthSettings.authority + "/reports-srv/device/reviewlist/" + sub;
|
|
550
|
-
http.onreadystatechange = function () {
|
|
551
|
-
if (http.readyState == 4) {
|
|
552
|
-
if (http.responseText) {
|
|
553
|
-
resolve(JSON.parse(http.responseText));
|
|
554
|
-
} else {
|
|
555
|
-
resolve(false);
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
};
|
|
559
|
-
http.open("GET", _serviceURL, true);
|
|
560
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
561
|
-
http.setRequestHeader("Authorization", `Bearer ${access_token}`);
|
|
562
|
-
if (window.localeSettings) {
|
|
563
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
564
|
-
}
|
|
565
|
-
http.send();
|
|
566
|
-
} catch (ex) {
|
|
567
|
-
throw new CustomException(ex, 417);
|
|
568
|
-
}
|
|
569
|
-
});
|
|
418
|
+
let _serviceURL = window.webAuthSettings.authority + "/reports-srv/device/reviewlist/" + sub;
|
|
419
|
+
return Helper.createPostPromise(undefined, _serviceURL,false, "GET", access_token);
|
|
570
420
|
};
|
|
571
421
|
|
|
572
422
|
/**
|
|
@@ -576,30 +426,8 @@ export class WebAuth {
|
|
|
576
426
|
* @returns
|
|
577
427
|
*/
|
|
578
428
|
reviewDevice(options: UpdateReviewDeviceEntity, access_token: string) {
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
var http = new XMLHttpRequest();
|
|
582
|
-
var _serviceURL = window.webAuthSettings.authority + "/reports-srv/device/updatereview";
|
|
583
|
-
http.onreadystatechange = function () {
|
|
584
|
-
if (http.readyState == 4) {
|
|
585
|
-
if (http.responseText) {
|
|
586
|
-
resolve(JSON.parse(http.responseText));
|
|
587
|
-
} else {
|
|
588
|
-
resolve(false);
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
};
|
|
592
|
-
http.open("PUT", _serviceURL, true);
|
|
593
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
594
|
-
http.setRequestHeader("Authorization", `Bearer ${access_token}`);
|
|
595
|
-
if (window.localeSettings) {
|
|
596
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
597
|
-
}
|
|
598
|
-
http.send(JSON.stringify(options));
|
|
599
|
-
} catch (ex) {
|
|
600
|
-
throw new CustomException(ex, 417);
|
|
601
|
-
}
|
|
602
|
-
});
|
|
429
|
+
let _serviceURL = window.webAuthSettings.authority + "/reports-srv/device/updatereview";
|
|
430
|
+
return Helper.createPostPromise(options, _serviceURL,false, "PUT", access_token);
|
|
603
431
|
};
|
|
604
432
|
|
|
605
433
|
/**
|
|
@@ -610,13 +438,9 @@ export class WebAuth {
|
|
|
610
438
|
return new Promise((resolve, reject) => {
|
|
611
439
|
try {
|
|
612
440
|
var value = ('; ' + document.cookie).split(`; cidaas_dr=`).pop().split(';')[0];
|
|
613
|
-
var
|
|
614
|
-
var options = { fingerprint: "", userAgent: "" };
|
|
441
|
+
var options = { userAgent: "" };
|
|
615
442
|
if (!value) {
|
|
616
443
|
(async () => {
|
|
617
|
-
var fp = await fpPromise;
|
|
618
|
-
var result = await fp.get();
|
|
619
|
-
options.fingerprint = result.visitorId
|
|
620
444
|
options.userAgent = window.navigator.userAgent
|
|
621
445
|
var http = new XMLHttpRequest();
|
|
622
446
|
var _serviceURL = window.webAuthSettings.authority + "/device-srv/deviceinfo";
|
|
@@ -983,7 +807,7 @@ export class WebAuth {
|
|
|
983
807
|
*/
|
|
984
808
|
getUserActivities(options: UserActivityEntity, access_token: string) {
|
|
985
809
|
var _serviceURL = window.webAuthSettings.authority + "/useractivity-srv/latestactivity";
|
|
986
|
-
return Helper.createPostPromise(options, _serviceURL, false, access_token);
|
|
810
|
+
return Helper.createPostPromise(options, _serviceURL, false,"POST", access_token);
|
|
987
811
|
};
|
|
988
812
|
|
|
989
813
|
/**
|
|
@@ -1042,7 +866,7 @@ export class WebAuth {
|
|
|
1042
866
|
*/
|
|
1043
867
|
updateProfileImage(options: { image_key: string; }, access_token: string) {
|
|
1044
868
|
var _serviceURL = window.webAuthSettings.authority + "/image-srv/profile/upload";
|
|
1045
|
-
return Helper.createPostPromise(options, _serviceURL, false, access_token);
|
|
869
|
+
return Helper.createPostPromise(options, _serviceURL, false,"POST", access_token);
|
|
1046
870
|
};
|
|
1047
871
|
|
|
1048
872
|
/**
|
|
@@ -1660,7 +1484,7 @@ export class WebAuth {
|
|
|
1660
1484
|
/**
|
|
1661
1485
|
* @deprecated
|
|
1662
1486
|
* authenticate ivr - v1
|
|
1663
|
-
* @param options
|
|
1487
|
+
* @param options
|
|
1664
1488
|
*/
|
|
1665
1489
|
authenticateIVR(options: any) {
|
|
1666
1490
|
var verificationType = "IVR";
|
|
@@ -1669,21 +1493,21 @@ export class WebAuth {
|
|
|
1669
1493
|
|
|
1670
1494
|
/**
|
|
1671
1495
|
* @deprecated
|
|
1672
|
-
* authenticate
|
|
1673
|
-
* @param options
|
|
1496
|
+
* authenticate totp - v1
|
|
1497
|
+
* @param options
|
|
1674
1498
|
*/
|
|
1675
|
-
|
|
1676
|
-
var verificationType = "
|
|
1499
|
+
authenticateTOTP(options: any) {
|
|
1500
|
+
var verificationType = "TOTP";
|
|
1677
1501
|
this.authenticateMfaV1(options, verificationType);
|
|
1678
1502
|
};
|
|
1679
1503
|
|
|
1680
1504
|
/**
|
|
1681
1505
|
* @deprecated
|
|
1682
|
-
* authenticate
|
|
1683
|
-
* @param options
|
|
1506
|
+
* authenticate backupcode - v1
|
|
1507
|
+
* @param options
|
|
1684
1508
|
*/
|
|
1685
|
-
|
|
1686
|
-
var verificationType = "
|
|
1509
|
+
authenticateBackupcode(options: any) {
|
|
1510
|
+
var verificationType = "BACKUPCODE";
|
|
1687
1511
|
this.authenticateMfaV1(options, verificationType);
|
|
1688
1512
|
};
|
|
1689
1513
|
}
|
|
@@ -11,7 +11,7 @@ var ConsentService;
|
|
|
11
11
|
*/
|
|
12
12
|
function getConsentDetailsV2(options) {
|
|
13
13
|
var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/v2/consent/usage/public/info";
|
|
14
|
-
return Helper_1.Helper.createPostPromise(options, _serviceURL, false);
|
|
14
|
+
return Helper_1.Helper.createPostPromise(options, _serviceURL, false, "POST");
|
|
15
15
|
}
|
|
16
16
|
ConsentService.getConsentDetailsV2 = getConsentDetailsV2;
|
|
17
17
|
;
|
|
@@ -22,7 +22,7 @@ var ConsentService;
|
|
|
22
22
|
*/
|
|
23
23
|
function acceptConsentV2(options) {
|
|
24
24
|
var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/v2/consent/usage/accept";
|
|
25
|
-
return Helper_1.Helper.createPostPromise(options, _serviceURL, false);
|
|
25
|
+
return Helper_1.Helper.createPostPromise(options, _serviceURL, false, "POST");
|
|
26
26
|
}
|
|
27
27
|
ConsentService.acceptConsentV2 = acceptConsentV2;
|
|
28
28
|
;
|
|
@@ -32,32 +32,8 @@ var ConsentService;
|
|
|
32
32
|
* @returns
|
|
33
33
|
*/
|
|
34
34
|
function getScopeConsentVersionDetailsV2(options) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
var http = new XMLHttpRequest();
|
|
38
|
-
var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/v2/consent/versions/details/" + options.scopeid + "?locale=" + options.locale;
|
|
39
|
-
http.onreadystatechange = function () {
|
|
40
|
-
if (http.readyState == 4) {
|
|
41
|
-
if (http.responseText) {
|
|
42
|
-
resolve(JSON.parse(http.responseText));
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
resolve(false);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
http.open("GET", _serviceURL, true);
|
|
50
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
51
|
-
http.setRequestHeader("Authorization", "Bearer ".concat(options.access_token));
|
|
52
|
-
if (window.localeSettings) {
|
|
53
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
54
|
-
}
|
|
55
|
-
http.send();
|
|
56
|
-
}
|
|
57
|
-
catch (ex) {
|
|
58
|
-
reject(ex);
|
|
59
|
-
}
|
|
60
|
-
});
|
|
35
|
+
var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/v2/consent/versions/details/" + options.scopeid + "?locale=" + options.locale;
|
|
36
|
+
return Helper_1.Helper.createPostPromise(undefined, _serviceURL, false, "GET", options.access_token);
|
|
61
37
|
}
|
|
62
38
|
ConsentService.getScopeConsentVersionDetailsV2 = getScopeConsentVersionDetailsV2;
|
|
63
39
|
;
|
|
@@ -68,7 +44,7 @@ var ConsentService;
|
|
|
68
44
|
*/
|
|
69
45
|
function acceptScopeConsent(options) {
|
|
70
46
|
var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/consent/scope/accept";
|
|
71
|
-
return Helper_1.Helper.createPostPromise(options, _serviceURL, false);
|
|
47
|
+
return Helper_1.Helper.createPostPromise(options, _serviceURL, false, "POST");
|
|
72
48
|
}
|
|
73
49
|
ConsentService.acceptScopeConsent = acceptScopeConsent;
|
|
74
50
|
;
|
|
@@ -79,7 +55,7 @@ var ConsentService;
|
|
|
79
55
|
*/
|
|
80
56
|
function acceptClaimConsent(options) {
|
|
81
57
|
var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/consent/claim/accept";
|
|
82
|
-
return Helper_1.Helper.createPostPromise(options, _serviceURL, false);
|
|
58
|
+
return Helper_1.Helper.createPostPromise(options, _serviceURL, false, "POST");
|
|
83
59
|
}
|
|
84
60
|
ConsentService.acceptClaimConsent = acceptClaimConsent;
|
|
85
61
|
;
|
|
@@ -90,7 +66,7 @@ var ConsentService;
|
|
|
90
66
|
*/
|
|
91
67
|
function revokeClaimConsent(options) {
|
|
92
68
|
var _serviceURL = window.webAuthSettings.authority + "/consent-management-srv/consent/claim/revoke";
|
|
93
|
-
return Helper_1.Helper.createPostPromise(options, _serviceURL, false);
|
|
69
|
+
return Helper_1.Helper.createPostPromise(options, _serviceURL, false, "POST");
|
|
94
70
|
}
|
|
95
71
|
ConsentService.revokeClaimConsent = revokeClaimConsent;
|
|
96
72
|
;
|
|
@@ -266,47 +266,6 @@ export interface IUserEntity {
|
|
|
266
266
|
trackId: string;
|
|
267
267
|
need_reset_password: boolean;
|
|
268
268
|
}
|
|
269
|
-
export interface IUserEntity {
|
|
270
|
-
userStatus: string;
|
|
271
|
-
user_status: string;
|
|
272
|
-
user_status_reason: string;
|
|
273
|
-
username: string;
|
|
274
|
-
sub: string;
|
|
275
|
-
given_name: string;
|
|
276
|
-
family_name: string;
|
|
277
|
-
middle_name: string;
|
|
278
|
-
nickname: string;
|
|
279
|
-
originalProviderUserId?: string[];
|
|
280
|
-
email: string;
|
|
281
|
-
email_verified: boolean;
|
|
282
|
-
mobile_number: string;
|
|
283
|
-
mobile_number_obj: IMobileEntity | null;
|
|
284
|
-
mobile_number_verified: boolean;
|
|
285
|
-
phone_number: string;
|
|
286
|
-
phone_number_obj: IMobileEntity | null;
|
|
287
|
-
phone_number_verified: boolean;
|
|
288
|
-
profile: string;
|
|
289
|
-
picture: string;
|
|
290
|
-
website: string;
|
|
291
|
-
gender: string;
|
|
292
|
-
zoneinfo: string;
|
|
293
|
-
locale: string;
|
|
294
|
-
birthdate: Date | null;
|
|
295
|
-
address?: IAddressEntity;
|
|
296
|
-
customFields?: any;
|
|
297
|
-
identityCustomFields?: any;
|
|
298
|
-
password: string;
|
|
299
|
-
provider: string;
|
|
300
|
-
providerUserId: string;
|
|
301
|
-
identityId: string;
|
|
302
|
-
mfa_enabled?: boolean;
|
|
303
|
-
roles: string[];
|
|
304
|
-
userGroups: IUserGroupMap[];
|
|
305
|
-
groups?: IUserGroupMap[];
|
|
306
|
-
rawJSON: string;
|
|
307
|
-
trackId: string;
|
|
308
|
-
need_reset_password: boolean;
|
|
309
|
-
}
|
|
310
269
|
export interface IUserGroupMap {
|
|
311
270
|
sub: string;
|
|
312
271
|
groupId: string;
|
|
@@ -11,11 +11,11 @@ export declare class Helper {
|
|
|
11
11
|
* @param options
|
|
12
12
|
* @param serviceurl
|
|
13
13
|
* @param errorResolver
|
|
14
|
-
* @param access_token
|
|
15
|
-
* @param headers
|
|
14
|
+
* @param access_token??
|
|
15
|
+
* @param headers??
|
|
16
16
|
* @returns
|
|
17
17
|
*/
|
|
18
|
-
static createPostPromise(options: any, serviceurl: string, errorResolver: boolean, access_token?: string, headers?: any): Promise<unknown>;
|
|
18
|
+
static createPostPromise(options: any, serviceurl: string, errorResolver: boolean, method: string, access_token?: string, headers?: any): Promise<unknown>;
|
|
19
19
|
}
|
|
20
20
|
export declare class CustomException {
|
|
21
21
|
errorMessage: string;
|
|
@@ -31,11 +31,11 @@ var Helper = /** @class */ (function () {
|
|
|
31
31
|
* @param options
|
|
32
32
|
* @param serviceurl
|
|
33
33
|
* @param errorResolver
|
|
34
|
-
* @param access_token
|
|
35
|
-
* @param headers
|
|
34
|
+
* @param access_token??
|
|
35
|
+
* @param headers??
|
|
36
36
|
* @returns
|
|
37
37
|
*/
|
|
38
|
-
Helper.createPostPromise = function (options, serviceurl, errorResolver, access_token, headers) {
|
|
38
|
+
Helper.createPostPromise = function (options, serviceurl, errorResolver, method, access_token, headers) {
|
|
39
39
|
return new Promise(function (resolve, reject) {
|
|
40
40
|
try {
|
|
41
41
|
var http = new XMLHttpRequest();
|
|
@@ -49,7 +49,7 @@ var Helper = /** @class */ (function () {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
http.open(
|
|
52
|
+
http.open(method, serviceurl, true);
|
|
53
53
|
http.setRequestHeader("Content-type", "application/json");
|
|
54
54
|
if (headers) {
|
|
55
55
|
for (var key in headers) {
|