cidaas-javascript-sdk 2.3.0 → 2.4.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 CHANGED
@@ -1,18 +1,24 @@
1
- # [2.3.0](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/compare/v2.2.7...v2.3.0) (2023-03-02)
1
+ # [2.4.0](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/compare/v2.3.0...v2.4.0) (2023-03-23)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * [813](https://gitlab.widas.de/cidaas-v2/ui/issues/-/issues/813) added headers parameters ([966b149](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/966b1493c93b5ccf80839f2bcff979a541974730))
7
- * [813](https://gitlab.widas.de/cidaas-v2/ui/issues/-/issues/813) added headers parameters ([d085513](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/d085513585770cdae5bc6c8693d10c7f6764faaf))
8
- * [813](https://gitlab.widas.de/cidaas-v2/ui/issues/-/issues/813) added headers parameters ([e103f95](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/e103f956583b727c7e66f32d56a38fac84ab3f02))
9
- * [813](https://gitlab.widas.de/cidaas-v2/ui/issues/-/issues/813) added headers parameters ([a38ac72](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/a38ac7219decd19cd237ec82c6898ca09880218a))
10
- * adapt review changes ([81aec32](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/81aec32ce735fad6955ee7db7c0e8edb80df3059))
11
- * end statement with semicolon ([c924be0](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/c924be0a26022db76f5a516e20bf03051b809cc6))
12
- * indentation fix and readme update ([4b1568f](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/4b1568f8068952b93fa43689ac04a8c2bd5a43ca))
13
- * revert long-lat change ([86a35bc](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/86a35bc70d0ffd01b0f3a0acf13d5b0d114590f7))
6
+ * add username and email ([eefaa29](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/eefaa296b685be80f10b6a12f4ed0fc99d380cf4))
7
+ * Added few changes to readme file. ([ef38f00](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/ef38f00e9a734abe77e0553cb528f8836cd4085e))
8
+ * added new api in webauth.ts file ([d5f650d](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/d5f650dcc1f0ce93ef0c0adc81c0d78e4769b556))
9
+ * added the options for max_age parameter ([f1bb8a2](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/f1bb8a2a9e306b4515160b42786d9a5f401e091c))
10
+ * added the options for max_age parameters in SDK method ([209ce9e](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/209ce9e278319f026d1d3da3195341abe407f5fe))
11
+ * github sync ([b12d785](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/b12d7857c5d05972340ce27d4ceae72a0b9c0f90))
12
+ * option error ([3c79e1d](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/3c79e1d44d71a902d9b3209e13e0a16d4c31071a))
13
+ * option error fixed ([1724345](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/1724345045f11c8bedabebbdf433447baf08a8b5))
14
+ * push only master to github ([5ddb5b5](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/5ddb5b5408838468ff38bc649777d6d41fcc7e41))
15
+ * read me file update for account link ([1f62e22](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/1f62e22f40f3808aaa6566d404f2b5950616c8d7))
16
+ * remove manual trigger ([80391c1](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/80391c135b19d15c86012899c784edf664e58fe5))
17
+ * skip remote add if exists ([9080176](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/908017679774080c58e77f073c1c8fecd31d7de1))
18
+ * sync branch changes ([2ae6213](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/2ae621374c29de663ecfc295610c54f03445e6c6))
19
+ * vulnerability fix ([444adb5](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/444adb5249c45e0782d5fb2280a60c5518064a85))
14
20
 
15
21
 
16
22
  ### Features
17
23
 
18
- * added the acceptlanguage options in header ([7871bc9](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/7871bc9290ca34e5cf91d0ab00a0ae1905437bc6)), closes [/gitlab.widas.de/customer-specific-projects/integration-team/cidaas-public-devkit-documentation/-/issues/218#note_552348](https://gitlab.widas.de//gitlab.widas.de/customer-specific-projects/integration-team/cidaas-public-devkit-documentation/-/issues/218/issues/note_552348)
24
+ * added useraccountLink api for two users and update the readme file ([3eea712](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/3eea7123c435bda2ea59ea5bfff1b0481d204940))
package/README.md CHANGED
@@ -83,7 +83,7 @@ To complete the login process, call ****logincallback()****. This will parses th
83
83
 
84
84
  ```js
85
85
  cidaas.loginCallback().then(function(response) {
86
- // your success code here
86
+ // the response will give you login details.
87
87
  }).catch(function(ex) {
88
88
  // your failure code here
89
89
  });
@@ -103,7 +103,7 @@ cidaas.registerWithBrowser();
103
103
  To get the user profile information, call ****getUserInfo()****. This will return the basic user profile details along with groups, roles and whatever scopes you mentioned in the options.
104
104
  ```js
105
105
  cidaas.getUserInfo().then(function (response) {
106
- // your success code here
106
+ // the response will give you profile details.
107
107
  }).catch(function(ex) {
108
108
  // your failure code here
109
109
  });;
@@ -114,7 +114,7 @@ cidaas.getUserInfo().then(function (response) {
114
114
 
115
115
  ```js
116
116
  cidaas.logout().then(function () {
117
- // your success code here
117
+ // your logout success code here
118
118
  }).catch(function(ex) {
119
119
  // your failure code here
120
120
  });
@@ -136,7 +136,7 @@ Each and every proccesses starts with requestId, it is an entry point to login o
136
136
 
137
137
  ```js
138
138
  cidaas.getRequestId().then(function (response) {
139
- // your success code here
139
+ // the response will give you request ID.
140
140
  }).catch(function(ex) {
141
141
  // your failure code here
142
142
  });
@@ -163,7 +163,7 @@ To get the tenant basic information, call ****getTenantInfo()****. This will ret
163
163
  ##### Sample code
164
164
  ```js
165
165
  cidaas.getTenantInfo().then(function (response) {
166
- // your success code here
166
+ // the response will give you tenent details.
167
167
  }).catch(function(ex) {
168
168
  // your failure code here
169
169
  });
@@ -196,7 +196,7 @@ cidaas.getClientInfo({
196
196
  requestId: 'your requestId',
197
197
  acceptlanguage: 'your locale' // optional example: de-de, en-US
198
198
  }).then(function (resp) {
199
- // your success code here
199
+ // the response will give you client info.
200
200
  }).catch(function(ex) {
201
201
  // your failure code here
202
202
  });
@@ -258,7 +258,7 @@ cidaas.getRegistrationSetup({
258
258
  requestId: 'your requestId',
259
259
  acceptlanguage: 'your locale' // optional example: de-de, en-US
260
260
  }).then(function (resp) {
261
- // your success code here
261
+ // the response will give you fields that are required.
262
262
  }).catch(function(ex) {
263
263
  // your failure code here
264
264
  });
@@ -365,7 +365,7 @@ cidaas.register({
365
365
  provider: 'your provider', // FACEBOOK, GOOGLE, SELF
366
366
  acceptlanguage: 'your locale' // optional example: de-de, en-US
367
367
  }, headers).then(function (response) {
368
- // type your code here
368
+ // the response will give you client registration details.
369
369
  }).catch(function(ex) {
370
370
  // your failure code here
371
371
  });
@@ -417,7 +417,7 @@ cidaas.getMissingFields({
417
417
  requestId: 'your requestId', // which you will get it from url
418
418
  acceptlanguage: 'your locale' // optional example: de-de, en-US
419
419
  }).then(function (response) {
420
- // type your code here
420
+ // the response will give you user info with missing fields.
421
421
  }).catch(function (ex) {
422
422
  // your failure code here
423
423
  });
@@ -436,7 +436,7 @@ cidaas.getCommunicationStatus({
436
436
  sub: 'your sub', // which you will get on the registration response
437
437
  acceptlanguage: 'your locale' // optional example: de-de, en-US
438
438
  }).then(function (response) {
439
- // type your code here
439
+ // the response will give you account details once its verified.
440
440
  }).catch(function(ex) {
441
441
  // your failure code here
442
442
  });
@@ -467,7 +467,7 @@ cidaas.initiateAccountVerification({
467
467
  processingType: 'CODE',
468
468
  sub: 'your sub'
469
469
  }).then(function (response) {
470
- // type your code here
470
+ // the response will give you account verification details.
471
471
  }).catch(function(ex) {
472
472
  // your failure code here
473
473
  });
@@ -494,7 +494,7 @@ cidaas.verifyAccount({
494
494
  accvid: 'your accvid', // which you will get on initiate account verification response
495
495
  code: 'your code in email or sms or ivr'
496
496
  }).then(function (response) {
497
- // type your code here
497
+ // the response will give you account verification ID and unique code.
498
498
  }).catch(function(ex) {
499
499
  // your failure code here
500
500
  });
@@ -515,7 +515,7 @@ cidaas.initiateResetPassword({
515
515
  requestId: 'your requestId',
516
516
  resetMedium: 'email'
517
517
  }).then(function (response) {
518
- // type your code here
518
+ // the response will give you password reset details.
519
519
  }).catch(function(ex) {
520
520
  // your failure code here
521
521
  });
@@ -543,7 +543,7 @@ cidaas.handleResetPassword({
543
543
  code: 'your code in email or sms or ivr',
544
544
  resetRequestId: 'your resetRequestId' // which you will get on initiate reset password response
545
545
  }).then(function (response) {
546
- // type your code here
546
+ // the response will give you valid verification code.
547
547
  }).catch(function(ex) {
548
548
  // your failure code here
549
549
  });
@@ -573,7 +573,7 @@ cidaas.resetPassword({
573
573
  exchangeId: 'your exchangeId', // which you will get on handle reset password response
574
574
  resetRequestId: 'your resetRequestId' // which you will get on handle reset password response
575
575
  }).then(function (response) {
576
- // type your code here
576
+ // the response will give you reset password details.
577
577
  }).catch(function(ex) {
578
578
  // your failure code here
579
579
  });
@@ -603,7 +603,7 @@ cidaas.changePassword({
603
603
  identityId: 'asdauet1-quwyteuqqwejh-asdjhasd',
604
604
  }, 'your access token')
605
605
  .then(function () {
606
- // type your code here
606
+ // the response will give you changed password.
607
607
  }).catch(function (ex) {
608
608
  // your failure code here
609
609
  });
@@ -631,7 +631,7 @@ cidaas.getProfileInfo({
631
631
  access_token: 'your access token',
632
632
  acceptlanguage: 'your locale' // optional example: de-de, en-US
633
633
  }).then(function (response) {
634
- // type your code here
634
+ // the response will give you user profile details.
635
635
  }).catch(function (ex) {
636
636
  // your failure code here
637
637
  });
@@ -706,7 +706,7 @@ cidaas.getUserProfile({
706
706
  access_token: 'your access token',
707
707
  acceptlanguage: 'your locale' // optional example: de-de, en-US
708
708
  }).then(function (response) {
709
- // type your code here
709
+ // the response will give you user profile information.
710
710
  }).catch(function (ex) {
711
711
  // your failure code here
712
712
  });
@@ -742,7 +742,7 @@ cidaas.updateProfile({
742
742
  provider: 'self',
743
743
  acceptlanguage: 'your locale' // optional example: de-de, en-US
744
744
  }, 'your access token', 'your sub').then(function () {
745
- // type your code here
745
+ // the response will give you updated user profile info.
746
746
  }).catch(function (ex) {
747
747
  // your failure code here
748
748
  });
@@ -787,7 +787,7 @@ The usage of the method is as follows.
787
787
  ```js
788
788
  cidaas.deleteUserAccount(options).then(function (response) {
789
789
 
790
- // your success code here
790
+ // the response will give you account details to be deleted.
791
791
 
792
792
  }).catch(function(ex) {
793
793
 
@@ -823,7 +823,7 @@ this.cidaas.setupEmail({
823
823
  deviceId: 'your device id'
824
824
  }
825
825
  }).then((response) => {
826
- // type your code here
826
+ // the response will give you details for email setup.
827
827
  }).catch((err) => {
828
828
  // your failure code here
829
829
  });
@@ -853,7 +853,7 @@ this.cidaas.enrollEmail({
853
853
  deviceId: 'your device id'
854
854
  }
855
855
  }).then((response) => {
856
- // type your code here
856
+ // the response will give you email and device info to be linked.
857
857
  }).catch((err) => {
858
858
  // your failure code here
859
859
  });
@@ -886,7 +886,7 @@ this.cidaas.initiateEmail({
886
886
  deviceId: 'your device id'
887
887
  }
888
888
  }).then((response) => {
889
- // type your code here
889
+ // the response will give you email verification code details.
890
890
  }).catch((err) => {
891
891
  // your failure code here
892
892
  });
@@ -918,7 +918,7 @@ this.cidaas.authenticateEmail({
918
918
  deviceId: 'your device id'
919
919
  }
920
920
  }).then((response) => {
921
- // type your code here
921
+ // the response will give you email authentication details.
922
922
  }).catch((err) => {
923
923
  // your failure code here
924
924
  });
@@ -948,7 +948,7 @@ this.cidaas.setupSMS({
948
948
  deviceId: 'your device id'
949
949
  }
950
950
  }).then((response) => {
951
- // type your code here
951
+ // the response will give you details for SMS setup.
952
952
  }).catch((err) => {
953
953
  // your failure code here
954
954
  });
@@ -978,7 +978,7 @@ this.cidaas.enrollSMS({
978
978
  deviceId: 'your device id'
979
979
  }
980
980
  }).then((response) => {
981
- // type your code here
981
+ // the response will give you SMS and device info to be linked
982
982
  }).catch((err) => {
983
983
  // your failure code here
984
984
  });
@@ -1011,7 +1011,7 @@ this.cidaas.initiateSMS({
1011
1011
  deviceId: 'your device id'
1012
1012
  }
1013
1013
  }).then((response) => {
1014
- // type your code here
1014
+ // the response will give you SMS verification code details.
1015
1015
  }).catch((err) => {
1016
1016
  // your failure code here
1017
1017
  });
@@ -1043,7 +1043,7 @@ this.cidaas.authenticateSMS({
1043
1043
  deviceId: 'your device id'
1044
1044
  }
1045
1045
  }).then((response) => {
1046
- // type your code here
1046
+ // the response will give you SMS authentiction details.
1047
1047
  }).catch((err) => {
1048
1048
  // your failure code here
1049
1049
  });
@@ -1073,7 +1073,7 @@ this.cidaas.setupIVR({
1073
1073
  deviceId: 'your device id'
1074
1074
  }
1075
1075
  }).then((response) => {
1076
- // type your code here
1076
+ // the response will give you details for IVR setup.
1077
1077
  }).catch((err) => {
1078
1078
  // your failure code here
1079
1079
  });
@@ -1103,7 +1103,7 @@ this.cidaas.enrollIVR({
1103
1103
  deviceId: 'your device id'
1104
1104
  }
1105
1105
  }).then((response) => {
1106
- // type your code here
1106
+ // the response will give you IVR and device info to be linked.
1107
1107
  }).catch((err) => {
1108
1108
  // your failure code here
1109
1109
  });
@@ -1136,7 +1136,7 @@ this.cidaas.initiateIVR({
1136
1136
  deviceId: 'your device id'
1137
1137
  }
1138
1138
  }).then((response) => {
1139
- // type your code here
1139
+ // the response will give you IVR verification code details.
1140
1140
  }).catch((err) => {
1141
1141
  // your failure code here
1142
1142
  });
@@ -1168,7 +1168,7 @@ this.cidaas.authenticateIVR({
1168
1168
  deviceId: 'your device id'
1169
1169
  }
1170
1170
  }).then((response) => {
1171
- // type your code here
1171
+ // the response will give you IVR authentication details.
1172
1172
  }).catch((err) => {
1173
1173
  // your failure code here
1174
1174
  });
@@ -1198,7 +1198,7 @@ this.cidaas.setupBackupcode({
1198
1198
  deviceId: 'your device id'
1199
1199
  }
1200
1200
  }).then((response) => {
1201
- // type your code here
1201
+ // the response will give you details for backup-code setup.
1202
1202
  }).catch((err) => {
1203
1203
  // your failure code here
1204
1204
  });
@@ -1237,7 +1237,7 @@ this.cidaas.initiateBackupcode({
1237
1237
  deviceId: 'your device id'
1238
1238
  }
1239
1239
  }).then((response) => {
1240
- // type your code here
1240
+ // the response will give you backup-code verification code details.
1241
1241
  }).catch((err) => {
1242
1242
  // your failure code here
1243
1243
  });
@@ -1269,7 +1269,7 @@ this.cidaas.authenticateBackupcode({
1269
1269
  deviceId: 'your device id'
1270
1270
  }
1271
1271
  }).then((response) => {
1272
- // type your code here
1272
+ // the response will give you backup-code authentication details.
1273
1273
  }).catch((err) => {
1274
1274
  // your failure code here
1275
1275
  });
@@ -1300,7 +1300,7 @@ this.cidaas.setupTOTP({
1300
1300
  deviceId: 'your device id'
1301
1301
  }
1302
1302
  }).then((response) => {
1303
- // type your code here
1303
+ // the response will give you details for TOTP setup.
1304
1304
  }).catch((err) => {
1305
1305
  // your failure code here
1306
1306
  });
@@ -1330,7 +1330,7 @@ this.cidaas.enrollTOTP({
1330
1330
  deviceId: 'your device id'
1331
1331
  }
1332
1332
  }).then((response) => {
1333
- // type your code here
1333
+ // the response will give you TOTP and device info to be linked.
1334
1334
  }).catch((err) => {
1335
1335
  // your failure code here
1336
1336
  });
@@ -1363,7 +1363,7 @@ this.cidaas.initiateTOTP({
1363
1363
  deviceId: 'your device id'
1364
1364
  }
1365
1365
  }).then((response) => {
1366
- // type your code here
1366
+ // the response will give you TOTP verification details.
1367
1367
  }).catch((err) => {
1368
1368
  // your failure code here
1369
1369
  });
@@ -1395,7 +1395,7 @@ this.cidaas.authenticateTOTP({
1395
1395
  deviceId: 'your device id'
1396
1396
  }
1397
1397
  }).then((response) => {
1398
- // type your code here
1398
+ // the response will give you TOTP authentication details.
1399
1399
  }).catch((err) => {
1400
1400
  // your failure code here
1401
1401
  });
@@ -1426,7 +1426,7 @@ this.cidaas.setupPattern({
1426
1426
  deviceId: 'your device id'
1427
1427
  }
1428
1428
  }).then((response) => {
1429
- // type your code here
1429
+ // the response will give you details for Pattern setup.
1430
1430
  }).catch((err) => {
1431
1431
  // your failure code here
1432
1432
  });
@@ -1460,7 +1460,7 @@ this.cidaas.initiatePattern({
1460
1460
  deviceId: 'your device id'
1461
1461
  }
1462
1462
  }).then((response) => {
1463
- // type your code here
1463
+ // the response will give you Pattern verification details.
1464
1464
  }).catch((err) => {
1465
1465
  // your failure code here
1466
1466
  });
@@ -1493,7 +1493,7 @@ this.cidaas.setupTouchId({
1493
1493
  deviceId: 'your device id'
1494
1494
  }
1495
1495
  }).then((response) => {
1496
- // type your code here
1496
+ // the response will give you details for Touch ID setup.
1497
1497
  }).catch((err) => {
1498
1498
  // your failure code here
1499
1499
  });
@@ -1527,7 +1527,7 @@ this.cidaas.initiateTouchId({
1527
1527
  deviceId: 'your device id'
1528
1528
  }
1529
1529
  }).then((response) => {
1530
- // type your code here
1530
+ // the response will give you Touch ID verification details.
1531
1531
  }).catch((err) => {
1532
1532
  // your failure code here
1533
1533
  });
@@ -1560,7 +1560,7 @@ this.cidaas.setupSmartPush({
1560
1560
  deviceId: 'your device id'
1561
1561
  }
1562
1562
  }).then((response) => {
1563
- // type your code here
1563
+ // the response will give you details for Smart Push setup.
1564
1564
  }).catch((err) => {
1565
1565
  // your failure code here
1566
1566
  });
@@ -1583,7 +1583,7 @@ this.cidaas.initiateSmartPush({
1583
1583
  deviceId: 'your device id'
1584
1584
  }
1585
1585
  }).then((response) => {
1586
- // type your code here
1586
+ // the response will give you Smart Push verification details.
1587
1587
  }).catch((err) => {
1588
1588
  // your failure code here
1589
1589
  });
@@ -1616,7 +1616,7 @@ this.cidaas.setupFace({
1616
1616
  deviceId: 'your device id'
1617
1617
  }
1618
1618
  }).then((response) => {
1619
- // type your code here
1619
+ // the response will give you details for Face setup.
1620
1620
  }).catch((err) => {
1621
1621
  // your failure code here
1622
1622
  });
@@ -1650,7 +1650,7 @@ this.cidaas.initiateFace({
1650
1650
  deviceId: 'your device id'
1651
1651
  }
1652
1652
  }).then((response) => {
1653
- // type your code here
1653
+ // the response will give you Face verification details.
1654
1654
  }).catch((err) => {
1655
1655
  // your failure code here
1656
1656
  });
@@ -1683,7 +1683,7 @@ this.cidaas.setupVoice({
1683
1683
  deviceId: 'your device id'
1684
1684
  }
1685
1685
  }).then((response) => {
1686
- // type your code here
1686
+ // the response will give you details for Voice setup.
1687
1687
  }).catch((err) => {
1688
1688
  // your failure code here
1689
1689
  });
@@ -1717,7 +1717,7 @@ this.cidaas.initiateVoice({
1717
1717
  deviceId: 'your device id'
1718
1718
  }
1719
1719
  }).then((response) => {
1720
- // type your code here
1720
+ // the response will give you Voice verification details.
1721
1721
  }).catch((err) => {
1722
1722
  // your failure code here
1723
1723
  });
@@ -1765,7 +1765,7 @@ this.cidaas.getConsentDetails({
1765
1765
  consent_name: 'your consent name',
1766
1766
  acceptlanguage: 'your locale' // optional example: de-de, en-US
1767
1767
  }).then((response) => {
1768
- // type your code here
1768
+ // the response will give you details of consent.
1769
1769
  }).catch((err) => {
1770
1770
  // your failure code here
1771
1771
  });
@@ -1796,7 +1796,7 @@ this.cidaas.acceptConsent({
1796
1796
  client_id: 'your client id',
1797
1797
  accepted: true
1798
1798
  }).then((response) => {
1799
- // type your code here
1799
+ // the response will give you details of accepted consent.
1800
1800
  }).catch((err) => {
1801
1801
  // your failure code here
1802
1802
  });
@@ -1838,7 +1838,7 @@ this.cidaas.acceptClaimConsent({
1838
1838
  client_id: 'your client id',
1839
1839
  accepted: "accepted claims with array eg: []"
1840
1840
  }).then((response) => {
1841
- // type your code here
1841
+ // the response will give you accepted claim consent.
1842
1842
  }).catch((err) => {
1843
1843
  // your failure code here
1844
1844
  });
@@ -1863,7 +1863,7 @@ this.cidaas.revokeClaimConsent({
1863
1863
  sub: 'your sub',
1864
1864
  revoked_claims: "revoked claims with array eg: []"
1865
1865
  }).then((response) => {
1866
- // type your code here
1866
+ // the response will give you revoked claim consent.
1867
1867
  }).catch((err) => {
1868
1868
  // your failure code here
1869
1869
  });
@@ -1889,7 +1889,7 @@ this.cidaas.getDeduplicationDetails({
1889
1889
  track_id: 'your track id',
1890
1890
  acceptlanguage: 'your locale' // optional example: de-de, en-US
1891
1891
  }).then((response) => {
1892
- // type your code here
1892
+ // the response will give you deduplication details of users.
1893
1893
  }).catch((err) => {
1894
1894
  // your failure code here
1895
1895
  });
@@ -1924,7 +1924,7 @@ this.cidaas.registerDeduplication({
1924
1924
  track_id: 'your track id',
1925
1925
  acceptlanguage: 'your locale' // optional example: de-de, en-US
1926
1926
  }).then((response) => {
1927
- // type your code here
1927
+ // the response will give you new registered deduplication user.
1928
1928
  }).catch((err) => {
1929
1929
  // your failure code here
1930
1930
  });
@@ -1955,7 +1955,7 @@ this.cidaas.deduplicationLogin({
1955
1955
  requestId: 'your request id',
1956
1956
  password: 'your password'
1957
1957
  }).then((response) => {
1958
- // type your code here
1958
+ // the response will give you deduplication login details.
1959
1959
  }).catch((err) => {
1960
1960
  // your failure code here
1961
1961
  });
@@ -1976,6 +1976,40 @@ this.cidaas.deduplicationLogin({
1976
1976
  }
1977
1977
  }
1978
1978
  ```
1979
+
1980
+ ##### Initiate Users Link
1981
+
1982
+ To initiate a new user link, call ****userAccountLink()****.
1983
+
1984
+ ##### Sample code
1985
+
1986
+ ```js
1987
+ var options = {
1988
+ sub: 'sub of the user who initiates the user link',
1989
+ username: 'username of the user which should get linked',
1990
+ redirect_uri: 'redirect uri the user should get redirected after successful account linking'
1991
+ }
1992
+ ```
1993
+
1994
+ ```js
1995
+ this.cidaas.userAccountLink(options, access_token).then((response) => {
1996
+ // the response will give you that both user are linked.
1997
+ }).catch((err) => {
1998
+ // your failure code here
1999
+ });
2000
+ ```
2001
+
2002
+ ##### Response
2003
+ ```json
2004
+ {
2005
+ "success":true,
2006
+ "status":200,
2007
+ "data": {
2008
+ "redirectUri": "string"
2009
+ }
2010
+ }
2011
+ ```
2012
+
1979
2013
  #### Socket Connection
1980
2014
 
1981
2015
  ##### Installation
@@ -2065,3 +2099,12 @@ this.socket.on("status-update", (msg) => {
2065
2099
  }
2066
2100
  });
2067
2101
  ```
2102
+
2103
+ ## Possible Error
2104
+
2105
+ The SDK will throws Custom Exception if something went wrong during the operation:
2106
+
2107
+ | HTTP Status Code | When could it be thrown |
2108
+ |---|---|
2109
+ | 500 | during creation of WebAuth instance |
2110
+ | 417 | if there are any other failure |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cidaas-javascript-sdk",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "author": "cidaas by Widas ID GmbH",
5
5
  "description": "Cidaas native javascript sdk",
6
6
  "license": "MIT",
@@ -37,7 +37,7 @@
37
37
  "jest": "27.3.1",
38
38
  "terser-webpack-plugin": "^5.2.4",
39
39
  "typescript": "^4.5.4",
40
- "webpack": "^5.59.1",
40
+ "webpack": "^5.76.2",
41
41
  "webpack-cli": "^4.9.1",
42
42
  "webpack-dev-server": "^4.3.1",
43
43
  "webpack-hot-middleware": "^2.25.1",
@@ -307,7 +307,7 @@ WebAuth.prototype.base64URL = function (string) {
307
307
  };
308
308
 
309
309
  // get login url
310
- WebAuth.prototype.getLoginURL = function () {
310
+ WebAuth.prototype.getLoginURL = function (options = {}) {
311
311
  var settings = window.webAuthSettings;
312
312
  if (!settings.response_type) {
313
313
  settings.response_type = "code";
@@ -328,6 +328,9 @@ WebAuth.prototype.getLoginURL = function () {
328
328
  loginURL += "&response_mode=" + settings.response_mode;
329
329
  }
330
330
  loginURL += "&scope=" + settings.scope;
331
+ if(options && options.max_age){
332
+ loginURL += "&max_age=" + options.max_age;
333
+ }
331
334
  console.log(loginURL);
332
335
  return loginURL;
333
336
  };
@@ -1446,7 +1449,7 @@ WebAuth.prototype.getUnreviewedDevices = function (access_token, sub) {
1446
1449
  }
1447
1450
  };
1448
1451
  http.open("GET", _serviceURL, true);
1449
- http = createHeaders(http, options);
1452
+ http = createHeaders(http, null);
1450
1453
  http.setRequestHeader("Authorization", `Bearer ${access_token}`);
1451
1454
 
1452
1455
  http.send();
@@ -1472,7 +1475,7 @@ WebAuth.prototype.getReviewedDevices = function (access_token, sub) {
1472
1475
  }
1473
1476
  };
1474
1477
  http.open("GET", _serviceURL, true);
1475
- http = createHeaders(http, options);
1478
+ http = createHeaders(http, null);
1476
1479
  http.setRequestHeader("Authorization", `Bearer ${access_token}`);
1477
1480
  http.send();
1478
1481
  } catch (ex) {
@@ -1768,7 +1771,7 @@ WebAuth.prototype.getMissingFieldsLogin = function (trackId) {
1768
1771
  }
1769
1772
  };
1770
1773
  http.open("GET", _serviceURL, true);
1771
- http = createHeaders(http, options);
1774
+ http = createHeaders(http, null);
1772
1775
  http.send();
1773
1776
  } catch (ex) {
1774
1777
  reject(ex);
@@ -1887,4 +1890,10 @@ WebAuth.prototype.getDeviceInfo = function () {
1887
1890
  });
1888
1891
  };
1889
1892
 
1893
+ // initiates a new user link to link two existing users
1894
+ WebAuth.prototype.userAccountLink = function (options, access_token) {
1895
+ var _serviceURL = window.webAuthSettings.authority + "/useractions-srv/users/" + options.sub + "/link";
1896
+ return createPostPromise(options, _serviceURL, false, access_token);
1897
+ };
1898
+
1890
1899
  module.exports = WebAuth;
@@ -15,7 +15,7 @@ declare class WebAuth {
15
15
  generateRandomString(length: any): string;
16
16
  generateCodeChallenge(code_verifier: any): any;
17
17
  base64URL(string: any): any;
18
- getLoginURL(): string;
18
+ getLoginURL(options?: {}): string;
19
19
  getAccessToken(options: any): Promise<any>;
20
20
  validateAccessToken(options: any): Promise<any>;
21
21
  getRequestId(): Promise<any>;
@@ -27,6 +27,8 @@ declare class WebAuth {
27
27
  getTenantInfo(): Promise<any>;
28
28
  logoutUser(options: any): void;
29
29
  getClientInfo(options: any): Promise<any>;
30
+ getDevicesInfo(options: any): Promise<any>;
31
+ deleteDevice(options: any): Promise<any>;
30
32
  getRegistrationSetup(options: any): Promise<any>;
31
33
  register(options: any, headers: any): Promise<any>;
32
34
  getInviteUserDetails(options: any): Promise<any>;
@@ -134,5 +136,6 @@ declare class WebAuth {
134
136
  deviceCodeVerify(code: any): void;
135
137
  userCheckExists(options: any): Promise<any>;
136
138
  setAcceptLanguageHeader(acceptLanguage: any): void;
137
- getDeviceInfo(options: any): Promise<any>;
139
+ getDeviceInfo(): Promise<any>;
140
+ userAccountLink(options: any, access_token: any): Promise<any>;
138
141
  }