@sisense/sdk-rest-client 1.1.0 → 1.2.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.
|
@@ -37,16 +37,20 @@ export class SsoAuthenticator {
|
|
|
37
37
|
})
|
|
38
38
|
.then((res) => res.json())
|
|
39
39
|
.then((res) => {
|
|
40
|
-
|
|
40
|
+
var _a;
|
|
41
41
|
if (!res.isAuthenticated) {
|
|
42
42
|
// SSO is disabled on instance, do not proceed
|
|
43
43
|
if (!res.ssoEnabled)
|
|
44
44
|
throw new TranslatableError('errors.ssoNotEnabled');
|
|
45
45
|
// redirect to login page
|
|
46
|
-
window.location
|
|
46
|
+
(_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.assign(`${res.loginUrl}?return_to=${window.location.href}`);
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
// no authentication needed, indicate success
|
|
51
|
+
this._authenticating = false;
|
|
52
|
+
return true;
|
|
47
53
|
}
|
|
48
|
-
// no authentication needed, indicate success
|
|
49
|
-
return true;
|
|
50
54
|
});
|
|
51
55
|
});
|
|
52
56
|
}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"Sisense",
|
|
12
12
|
"Compose SDK"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.
|
|
14
|
+
"version": "1.2.0",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": "./dist/index.js",
|
|
17
17
|
"main": "./dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"author": "Sisense",
|
|
21
21
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@sisense/sdk-common": "^1.
|
|
23
|
+
"@sisense/sdk-common": "^1.2.0",
|
|
24
24
|
"fetch-intercept": "^2.4.0"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|