cidaas-javascript-sdk 4.3.1 → 4.3.2
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 +8 -15
- package/dist/web-auth/WebAuth.d.ts +8 -1
- package/dist/web-auth/WebAuth.js +10 -12
- package/dist/web-auth/webauth.model.d.ts +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
## [4.3.
|
|
1
|
+
## [4.3.2](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/compare/v4.3.1...v4.3.2) (2024-11-14)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* [#438](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/issues/438) test coverage fixes ([49e580d](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/49e580d0650963510cfcd9d29d415814b7a90b5c))
|
|
9
|
-
* **[270](https://gitlab.widas.de/cidaas-v2/PortalNDashboard-Team/issues/-/issues/270):** add accepting parameter lat, lon in headers in required ConsentService functions ([f223ebb](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/f223ebb2f00b5350a65106c861d2daff1dda7a2a))
|
|
10
|
-
* **[270](https://gitlab.widas.de/cidaas-v2/PortalNDashboard-Team/issues/-/issues/270):** add accepting parameter lat, lon in headers in required ConsentService getConsentDetails function ([b08f870](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/b08f870032c4c24f4bfc51d6a7812964b60b42e0))
|
|
11
|
-
* **[270](https://gitlab.widas.de/cidaas-v2/PortalNDashboard-Team/issues/-/issues/270):** add accepting parameter lat, lon in headers in required LoginService functions ([f440983](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/f440983d8e19a4a74a5eff0f1bf321c1f1fe5528))
|
|
12
|
-
* **[270](https://gitlab.widas.de/cidaas-v2/PortalNDashboard-Team/issues/-/issues/270):** add accepting parameter lat, lon in headers in required TokenService functions ([89aaf5a](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/89aaf5a15609e1bda80f1965129ffc596f39a4b3))
|
|
13
|
-
* **[270](https://gitlab.widas.de/cidaas-v2/PortalNDashboard-Team/issues/-/issues/270):** add accepting parameter lat, lon in headers in required UserService functions ([fa3ad7e](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/fa3ad7e6f93b5bf3d110688c66cf02e2e72924c0))
|
|
14
|
-
* **[270](https://gitlab.widas.de/cidaas-v2/PortalNDashboard-Team/issues/-/issues/270):** add accepting parameter lat, lon in headers in required VerificationService functions ([5e5c1d0](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/5e5c1d00453787c56395f35d1fd732d40b1134c5))
|
|
15
|
-
* 438 [Javascript SDK] make getRequestId function flexible ([ff6f2dd](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/ff6f2ddecf7e9029df95935e3ba7d8eb4569e15b))
|
|
16
|
-
* 438 review changes ([6dd54c0](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/6dd54c0f258b98d32de851cb27040374fe71c429))
|
|
17
|
-
* Fix vulnerabilities from npm audit ([9e89a88](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/9e89a8827fda8acf2366b1b737fa06593066bb10))
|
|
18
|
-
* update changelog ([1b236b5](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/1b236b56feaf38ec1cdc1118f56deb1a5be0b3c1))
|
|
19
|
-
* upgrade oidc-client-ts from 2.4.0 to 2.4.1 ([126a62f](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/126a62f354d0200dc772798922e584978291b036))
|
|
6
|
+
* rename const ([46b5363](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/46b5363ceaaac5255fbb3bf38e0f208bf18b0597))
|
|
7
|
+
* Update getRequestId() to support overriding single option ([c4f16ff](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/c4f16ff89ecaf1e6da7aaff319ab33354c67e8cb))
|
|
20
8
|
|
|
21
9
|
# Changelog
|
|
22
10
|
|
|
11
|
+
## V4.3.2
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- Update getRequestId() to support overriding single option
|
|
15
|
+
|
|
23
16
|
## V4.3.1
|
|
24
17
|
|
|
25
18
|
### Changed
|
|
@@ -114,10 +114,17 @@ export declare class WebAuth {
|
|
|
114
114
|
* Each and every proccesses starts with requestId, it is an entry point to login or register. For getting the requestId, call **getRequestId()**.
|
|
115
115
|
* @example
|
|
116
116
|
* ```js
|
|
117
|
+
* // To get requestId using default configured settings, run the function without parameter
|
|
118
|
+
* cidaas.getRequestId().then(function (response) {
|
|
119
|
+
* // the response will give you request id.
|
|
120
|
+
* }).catch(function(ex) {
|
|
121
|
+
* // your failure code here
|
|
122
|
+
* });
|
|
123
|
+
*
|
|
124
|
+
* // To get requestId using custom settings, run the function with custom setting(s) inside option parameter. Example below will only override client_id & redirect_uri
|
|
117
125
|
* const option: GetRequestIdRequest = {
|
|
118
126
|
* 'client_id': 'your client id',
|
|
119
127
|
* 'redirect_uri': 'your redirect url',
|
|
120
|
-
* 'scope': 'your scopes',
|
|
121
128
|
* }
|
|
122
129
|
* cidaas.getRequestId(option).then(function (response) {
|
|
123
130
|
* // the response will give you request id.
|
package/dist/web-auth/WebAuth.js
CHANGED
|
@@ -224,10 +224,17 @@ class WebAuth {
|
|
|
224
224
|
* Each and every proccesses starts with requestId, it is an entry point to login or register. For getting the requestId, call **getRequestId()**.
|
|
225
225
|
* @example
|
|
226
226
|
* ```js
|
|
227
|
+
* // To get requestId using default configured settings, run the function without parameter
|
|
228
|
+
* cidaas.getRequestId().then(function (response) {
|
|
229
|
+
* // the response will give you request id.
|
|
230
|
+
* }).catch(function(ex) {
|
|
231
|
+
* // your failure code here
|
|
232
|
+
* });
|
|
233
|
+
*
|
|
234
|
+
* // To get requestId using custom settings, run the function with custom setting(s) inside option parameter. Example below will only override client_id & redirect_uri
|
|
227
235
|
* const option: GetRequestIdRequest = {
|
|
228
236
|
* 'client_id': 'your client id',
|
|
229
237
|
* 'redirect_uri': 'your redirect url',
|
|
230
|
-
* 'scope': 'your scopes',
|
|
231
238
|
* }
|
|
232
239
|
* cidaas.getRequestId(option).then(function (response) {
|
|
233
240
|
* // the response will give you request id.
|
|
@@ -237,18 +244,9 @@ class WebAuth {
|
|
|
237
244
|
* ```
|
|
238
245
|
*/
|
|
239
246
|
getRequestId(option) {
|
|
247
|
+
var _a, _b, _c, _d, _e;
|
|
240
248
|
const ui_locales = window.webAuthSettings.ui_locales;
|
|
241
|
-
const
|
|
242
|
-
const payload = option ? option : defaultPayload;
|
|
243
|
-
if (!payload.response_type) {
|
|
244
|
-
payload.response_type = 'token';
|
|
245
|
-
}
|
|
246
|
-
if (!payload.response_mode) {
|
|
247
|
-
payload.response_mode = 'fragment';
|
|
248
|
-
}
|
|
249
|
-
if (!payload.nonce) {
|
|
250
|
-
payload.nonce = new Date().getTime().toString();
|
|
251
|
-
}
|
|
249
|
+
const payload = Object.assign({ 'client_id': (_a = option === null || option === void 0 ? void 0 : option.client_id) !== null && _a !== void 0 ? _a : window.webAuthSettings.client_id, 'redirect_uri': (_b = option === null || option === void 0 ? void 0 : option.redirect_uri) !== null && _b !== void 0 ? _b : window.webAuthSettings.redirect_uri, 'response_type': (_c = option === null || option === void 0 ? void 0 : option.response_type) !== null && _c !== void 0 ? _c : (window.webAuthSettings.response_type || 'token'), 'response_mode': (_d = option === null || option === void 0 ? void 0 : option.response_mode) !== null && _d !== void 0 ? _d : (window.webAuthSettings.response_mode || 'fragment'), 'scope': (_e = option === null || option === void 0 ? void 0 : option.scope) !== null && _e !== void 0 ? _e : window.webAuthSettings.scope, 'nonce': new Date().getTime().toString() }, (ui_locales && { ui_locales } || {}));
|
|
252
250
|
const serviceURL = window.webAuthSettings.authority + '/authz-srv/authrequest/authz/generate';
|
|
253
251
|
return Helper_1.Helper.createHttpPromise(payload, serviceURL, false, "POST");
|
|
254
252
|
}
|
|
@@ -50,11 +50,11 @@ export interface UserActionOnEnrollmentRequest {
|
|
|
50
50
|
}
|
|
51
51
|
export interface GetRequestIdRequest {
|
|
52
52
|
/** Unique identifier of client app, can be found in app setting under admin ui */
|
|
53
|
-
client_id
|
|
53
|
+
client_id?: string;
|
|
54
54
|
/** Specify the url where the user needs to be redirected after successful login */
|
|
55
|
-
redirect_uri
|
|
55
|
+
redirect_uri?: string;
|
|
56
56
|
/** Permissions that are requested for this requestId */
|
|
57
|
-
scope
|
|
57
|
+
scope?: string;
|
|
58
58
|
/** Response type expected for the process e.g. token or code */
|
|
59
59
|
response_type?: string;
|
|
60
60
|
/** Response mode defines how the redirect_uri will receive the token or code e.g. as query or fragment */
|