cordova-plugin-unvired-universal-sdk 1.0.2 → 1.0.5
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/package.json +1 -1
- package/plugin.xml +1 -1
- package/src/browser/UnviredPluginProxy.js +1 -1
- package/www/authenticationService.ts +16 -11
package/package.json
CHANGED
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<plugin id="cordova-plugin-unvired-universal-sdk" version="1.0.
|
|
2
|
+
<plugin id="cordova-plugin-unvired-universal-sdk" version="1.0.5" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
|
|
3
3
|
<name>UnviredSDK</name>
|
|
4
4
|
<dependency id="cordova-plugin-device" version="^3.0.0" />
|
|
5
5
|
<dependency id="cordova-plugin-unvired-electron-db" version="0.0.14" />
|
|
@@ -403,7 +403,8 @@ export class AuthenticationService {
|
|
|
403
403
|
return;
|
|
404
404
|
}
|
|
405
405
|
} else {
|
|
406
|
-
|
|
406
|
+
// The Browser check is commented out for SAML2 login type.Because it should always call the activate rest api.
|
|
407
|
+
// if (FrameworkHelper.getPlatform() !== "browser") {
|
|
407
408
|
// Call activate rest api
|
|
408
409
|
const activationResponse = await HttpConnection.activateUser(loginParameters);
|
|
409
410
|
|
|
@@ -412,6 +413,7 @@ export class AuthenticationService {
|
|
|
412
413
|
if (activationResponse.status === Status.created) {
|
|
413
414
|
frameworkSettings = activationResponseObject;
|
|
414
415
|
loginParameters.frontendId = frameworkSettings[ServiceConstants.KeySettings]["frontendId"];
|
|
416
|
+
loginParameters.feUserId = frameworkSettings[ServiceConstants.KeySettings]["feUser"];
|
|
415
417
|
loginParameters.activationId = frameworkSettings[ServiceConstants.KeySettings]["activationId"];
|
|
416
418
|
const unviredId = UserSettingsFields[UserSettingsFields.unviredId];
|
|
417
419
|
userSettings[unviredId] = loginParameters.username;
|
|
@@ -431,16 +433,19 @@ export class AuthenticationService {
|
|
|
431
433
|
resolve(unviredResult);
|
|
432
434
|
return;
|
|
433
435
|
}
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
}
|
|
436
|
+
|
|
437
|
+
// } else {
|
|
438
|
+
// const unviredId = UserSettingsFields[UserSettingsFields.unviredId];
|
|
439
|
+
// userSettings[unviredId] = loginParameters.username;
|
|
440
|
+
// const unviredUserId = UserSettingsFields[UserSettingsFields.unviredUserId];
|
|
441
|
+
// userSettings[unviredUserId] = frameworkSettings[unviredId];
|
|
442
|
+
// const unviredPwd = UserSettingsFields[UserSettingsFields.unviredPassword];
|
|
443
|
+
// userSettings[unviredPwd] = FrameworkHelper.getMD5String(loginParameters.password);
|
|
444
|
+
// // added this to save the settings in the DB
|
|
445
|
+
// frameworkSettings = {"settings": frameworkSettings}
|
|
446
|
+
// }
|
|
447
|
+
|
|
448
|
+
|
|
444
449
|
// NOTE: This is not required as the jwt token is already available in the loginParameters.
|
|
445
450
|
// // Get jwt token from rest api
|
|
446
451
|
// const jwtResponse = await HttpConnection.getJwtToken(loginParameters);
|