cidaas-javascript-sdk 4.0.0 → 4.0.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 CHANGED
@@ -1,40 +1,16 @@
1
- # [4.0.0](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/compare/v3.1.5...v4.0.0) (2023-12-12)
1
+ ## [4.0.1](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/compare/v4.0.0...v4.0.1) (2024-01-08)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * resolved conflicts ([3727cc0](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/3727cc042cfb4232038b0cb970778ff12b803349))
7
- * resolved the merge conflicts ([8c41cbe](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/8c41cbe413e48660a3457914916e9ac44e77b8dd))
8
- * switch to GET method on getLinkedUsers ([a8302fe](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/a8302fe47500df9b4c127a7b140afa7755ce3d81))
9
- * updated the testcases, docs in ts and removed the docs from readme ([bc59f82](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/bc59f82e43ee5fe8925d0539dd1661a1e752dda6))
6
+ * semantic format to release new version ([ed1ebbf](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/ed1ebbff01ce924803f8b2f2ca4b0bb189753f29))
10
7
 
8
+ # Changelog
11
9
 
12
- * feat()!: upgrade to v4 ([041b774](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/041b774095a6139f344c32abdec42d7d1be77610))
13
-
14
-
15
- ### BREAKING CHANGES
16
-
17
- * ### Changed
18
- - **Breaking** authentication module can't be access publicly anymore, instead WebAuth should be used to access authentication functions.
19
- - **Breaking** popup & silent authentication functions is directly implemented in WebAuth instead of using mode.
20
- - **Breaking** silentSignIn is now returning promise
21
- - **Breaking** getLoginURL() function return promise instead of string
22
- - **Breaking** access_token option should be provided to revokeClaimConsent() function in consent service
23
- - **Breaking** use function parameter instead of cidaas configuration file: `cidaas_version` to handle resetPassword
24
- - **Breaking** change getCommunicationStatus parameter
25
- - **Breaking** rename functions with version name
26
- - **Breaking** rename getScopeConsentVersionDetails() function to getConsentVersionDetails()
27
- - **Breaking** rename updateStatus() function to getEnrollmentStatus()
28
- - **Breaking** rename getDeviceInfo() function to createDeviceInfo()
29
- - **Breaking** rename getScopeConsentDetails() function to loginPrecheck()
30
- - **Breaking** getMissingFieldsLogin() is now reimplemented as getMissingFields()
31
-
32
- ### Removed
33
- - **Breaking** remove deprecated functions
34
- - **Breaking** remove duplicate functions
35
- - **Breaking** remove functions which are not supported anymore
10
+ ## V4.0.1
36
11
 
37
- # Changelog
12
+ ### Changed
13
+ - initiateMFA() function will no longer require accessToken as parameter
38
14
 
39
15
  ## V4.0.0
40
16
 
package/README.md CHANGED
@@ -15,6 +15,8 @@
15
15
 
16
16
  This cidaas Javascript SDK library is built on the top of [OIDC client typescript library](https://github.com/authts/oidc-client-ts).
17
17
 
18
+ Please check the [Changelog](https://github.com/Cidaas/cidaas-sdk-javascript-v2/blob/master/CHANGELOG.md) for more information about the latest release.
19
+
18
20
  ## Table of Contents
19
21
 
20
22
  <!--ts-->
@@ -48,8 +50,6 @@ From npm
48
50
  npm install cidaas-javascript-sdk
49
51
  ```
50
52
 
51
- Please check the [Changelog](https://github.com/Cidaas/cidaas-sdk-javascript-v2/blob/master/CHANGELOG.md) for more information about the latest release
52
-
53
53
  ### Initialisation
54
54
 
55
55
  After adding the sdk library, create a local file such as **cidaas.service.ts** and define Cidaas options variable there for initializing cidaas sdk.
@@ -64,7 +64,7 @@ Cidaas options variable support every [OIDC Client UserManagerSettings Propertie
64
64
  | post_logout_redirect_uri | no | URL to be redirected after successful logout attempt. |
65
65
  | scope | no | the scope the application requires and requests from cidaas. The default value is 'openid' if no properties is being sent. |
66
66
 
67
- an example of index.js is looks like this:
67
+ an example of Cidaas options variable looks like this:
68
68
 
69
69
  ```js
70
70
  const options = {
@@ -201,4 +201,3 @@ The SDK will throws Custom Exception if something went wrong during the operatio
201
201
  |----------------- | ----------------------- |
202
202
  | 500 | during creation of WebAuth instance |
203
203
  | 417 | if there are any other failure |
204
-
@@ -201,7 +201,7 @@ export declare namespace VerificationService {
201
201
  * });
202
202
  * ```
203
203
  */
204
- function initiateMFA(options: IInitVerificationAuthenticationRequestEntity, accessToken: string): Promise<unknown>;
204
+ function initiateMFA(options: IInitVerificationAuthenticationRequestEntity, accessToken?: string): Promise<unknown>;
205
205
  /**
206
206
  * to authenticate with multi factor auhentication, call **authenticateMFA()**.
207
207
  * Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/1aa38936252d6-perform-the-authentication-method for more details.
@@ -243,7 +243,11 @@ var VerificationService;
243
243
  */
244
244
  function initiateMFA(options, accessToken) {
245
245
  var _serviceURL = window.webAuthSettings.authority + "/verification-srv/v2/authenticate/initiate/" + options.type;
246
- return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST", accessToken);
246
+ // TODO: remove accessToken parameter in the next major release
247
+ if (accessToken) {
248
+ return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST", accessToken);
249
+ }
250
+ return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST");
247
251
  }
248
252
  VerificationService.initiateMFA = initiateMFA;
249
253
  ;
@@ -629,7 +629,7 @@ export declare class WebAuth {
629
629
  * @param options
630
630
  * @returns
631
631
  */
632
- initiateMFA(options: IInitVerificationAuthenticationRequestEntity, accessToken: string): Promise<unknown>;
632
+ initiateMFA(options: IInitVerificationAuthenticationRequestEntity, accessToken?: string): Promise<unknown>;
633
633
  /**
634
634
  * authenticate mfa
635
635
  * @param options
@@ -1007,7 +1007,11 @@ var WebAuth = /** @class */ (function () {
1007
1007
  * @returns
1008
1008
  */
1009
1009
  WebAuth.prototype.initiateMFA = function (options, accessToken) {
1010
- return VerificationService_1.VerificationService.initiateMFA(options, accessToken);
1010
+ // TODO: remove accessToken parameter in the next major release
1011
+ if (accessToken) {
1012
+ return VerificationService_1.VerificationService.initiateMFA(options, accessToken);
1013
+ }
1014
+ return VerificationService_1.VerificationService.initiateMFA(options);
1011
1015
  };
1012
1016
  ;
1013
1017
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cidaas-javascript-sdk",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "author": "cidaas by Widas ID GmbH",
5
5
  "description": "Cidaas native javascript sdk",
6
6
  "license": "MIT",