cidaas-javascript-sdk 4.0.2 → 4.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 +17 -5
- package/README.md +1 -1
- package/dist/web-auth/UserService.d.ts +5 -1
- package/dist/web-auth/UserService.js +11 -2
- package/dist/web-auth/WebAuth.d.ts +1 -0
- package/dist/web-auth/WebAuth.js +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
# [4.1.0](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/compare/v4.0.2...v4.1.0) (2024-01-19)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Features
|
|
5
5
|
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* **[1441](https://gitlab.widas.de/cidaas-v2/framework/issues/-/issues/1441):** Add the new method for Get Invite User details ([5917eb0](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/5917eb0cf98248c66d0b149cb41cf27be69c41ae))
|
|
7
|
+
* **[1441](https://gitlab.widas.de/cidaas-v2/framework/issues/-/issues/1441):** Add the new method for Get Invite User details ([ffc503d](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/ffc503dfde2510c8000e18cb437b5ab0a7578ee8))
|
|
8
|
+
* **[1441](https://gitlab.widas.de/cidaas-v2/framework/issues/-/issues/1441):** Add the new method for Get Invite User details ([a3d2860](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/a3d28601490b0303c9f86b60aeda3c5a46788966))
|
|
9
|
+
* **[1441](https://gitlab.widas.de/cidaas-v2/framework/issues/-/issues/1441):** Add the new method for Get Invite User details ([88cd3b7](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/88cd3b766de7ede953594cc47d34d6e45dc3e17b))
|
|
10
|
+
* **[1441](https://gitlab.widas.de/cidaas-v2/framework/issues/-/issues/1441):** Add the new method for Get Invite User details ([1c347ef](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/1c347efc9a54d787538416b3eee1d609238b4b1d))
|
|
11
|
+
* **[1441](https://gitlab.widas.de/cidaas-v2/framework/issues/-/issues/1441):** Add the new method for Get Invite User details ([df4630a](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/df4630a8d8def6ef36d402f230f6ada86875e71e))
|
|
12
|
+
* **[1441](https://gitlab.widas.de/cidaas-v2/framework/issues/-/issues/1441):** Add the new method for Get Invite User details ([3a2ce7e](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/3a2ce7ec82b3ae91ffc8066081f905972f278985))
|
|
9
13
|
|
|
10
14
|
# Changelog
|
|
11
15
|
|
|
16
|
+
## V4.1.0
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- add latest getInviteUserDetails API, which can be called by specifying function parameter callLatestAPI: true
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
- support trailing slash on Cidaas options: 'authority'
|
|
23
|
+
|
|
12
24
|
## V4.0.2
|
|
13
25
|
|
|
14
26
|
### Fixed
|
package/README.md
CHANGED
|
@@ -200,4 +200,4 @@ The SDK will throws Custom Exception if something went wrong during the operatio
|
|
|
200
200
|
| HTTP Status Code | When could it be thrown |
|
|
201
201
|
|----------------- | ----------------------- |
|
|
202
202
|
| 500 | during creation of WebAuth instance |
|
|
203
|
-
| 417 | if there are any other failure |
|
|
203
|
+
| 417 | if there are any other failure |
|
|
@@ -55,11 +55,14 @@ export declare namespace UserService {
|
|
|
55
55
|
trackId?: string;
|
|
56
56
|
}): Promise<unknown>;
|
|
57
57
|
/**
|
|
58
|
-
* to get information about invitation details, call **getInviteUserDetails()
|
|
58
|
+
* to get information about invitation details, call **getInviteUserDetails()**. This API allows to retrieve invitation details and prefill the registration form.
|
|
59
|
+
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/0b5efa5a2db5d-prefill-the-user-invitation for more details.
|
|
60
|
+
* Minimum cidaas version to use latest api is v3.100
|
|
59
61
|
* @example
|
|
60
62
|
* ```js
|
|
61
63
|
* const options = {
|
|
62
64
|
* invite_id: 'id of user invitation'
|
|
65
|
+
* callLatestAPI: 'true' // call latest api if parameter is given. By default, the older api will be called
|
|
63
66
|
* }
|
|
64
67
|
* cidaas.getInviteUserDetails(options)
|
|
65
68
|
* .then(function () {
|
|
@@ -71,6 +74,7 @@ export declare namespace UserService {
|
|
|
71
74
|
*/
|
|
72
75
|
function getInviteUserDetails(options: {
|
|
73
76
|
invite_id: string;
|
|
77
|
+
callLatestAPI?: boolean;
|
|
74
78
|
}): Promise<unknown>;
|
|
75
79
|
/**
|
|
76
80
|
* Once registration successful, verify the account based on the flow. To get the details, call **getCommunicationStatus()**.
|
|
@@ -67,11 +67,14 @@ var UserService;
|
|
|
67
67
|
UserService.register = register;
|
|
68
68
|
;
|
|
69
69
|
/**
|
|
70
|
-
* to get information about invitation details, call **getInviteUserDetails()
|
|
70
|
+
* to get information about invitation details, call **getInviteUserDetails()**. This API allows to retrieve invitation details and prefill the registration form.
|
|
71
|
+
* Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/0b5efa5a2db5d-prefill-the-user-invitation for more details.
|
|
72
|
+
* Minimum cidaas version to use latest api is v3.100
|
|
71
73
|
* @example
|
|
72
74
|
* ```js
|
|
73
75
|
* const options = {
|
|
74
76
|
* invite_id: 'id of user invitation'
|
|
77
|
+
* callLatestAPI: 'true' // call latest api if parameter is given. By default, the older api will be called
|
|
75
78
|
* }
|
|
76
79
|
* cidaas.getInviteUserDetails(options)
|
|
77
80
|
* .then(function () {
|
|
@@ -82,7 +85,13 @@ var UserService;
|
|
|
82
85
|
* ```
|
|
83
86
|
*/
|
|
84
87
|
function getInviteUserDetails(options) {
|
|
85
|
-
var _serviceURL =
|
|
88
|
+
var _serviceURL = "";
|
|
89
|
+
if (options.callLatestAPI) {
|
|
90
|
+
_serviceURL = window.webAuthSettings.authority + "/useractions-srv/invitations/" + options.invite_id;
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
_serviceURL = window.webAuthSettings.authority + "/users-srv/invite/info/" + options.invite_id;
|
|
94
|
+
}
|
|
86
95
|
return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, false, "GET");
|
|
87
96
|
}
|
|
88
97
|
UserService.getInviteUserDetails = getInviteUserDetails;
|
package/dist/web-auth/WebAuth.js
CHANGED
|
@@ -65,6 +65,9 @@ var WebAuth = /** @class */ (function () {
|
|
|
65
65
|
if (!settings.scope) {
|
|
66
66
|
settings.scope = "email openid profile mobile";
|
|
67
67
|
}
|
|
68
|
+
if (settings.authority && settings.authority.charAt(settings.authority.length - 1) === '/') {
|
|
69
|
+
settings.authority = settings.authority.slice(0, settings.authority.length - 1);
|
|
70
|
+
}
|
|
68
71
|
var usermanager = new oidc_client_ts_1.UserManager(settings);
|
|
69
72
|
window.webAuthSettings = settings;
|
|
70
73
|
window.usermanager = usermanager;
|