@arsedizioni/ars-utils 20.2.30 → 20.2.31
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/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +4 -2
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +6 -2
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +7 -3
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2143,7 +2143,7 @@ class ClipperService {
|
|
|
2143
2143
|
*/
|
|
2144
2144
|
getTokenExpirationDate() {
|
|
2145
2145
|
const token = this.getAuthToken();
|
|
2146
|
-
if (!token)
|
|
2146
|
+
if (!token || token.length === 0)
|
|
2147
2147
|
return undefined;
|
|
2148
2148
|
// Parse json object from base64 encoded jwt token
|
|
2149
2149
|
const jwtToken = JSON.parse(atob(token.split('.')[1]));
|
|
@@ -2191,7 +2191,9 @@ class ClipperService {
|
|
|
2191
2191
|
* @param value : the login result
|
|
2192
2192
|
*/
|
|
2193
2193
|
setToken(value) {
|
|
2194
|
-
|
|
2194
|
+
if (value.authToken ?? value.token) {
|
|
2195
|
+
sessionStorage.setItem('clipper_auth', value.authToken ?? value.token);
|
|
2196
|
+
}
|
|
2195
2197
|
if (value.refreshToken) {
|
|
2196
2198
|
sessionStorage.setItem('clipper_refresh', value.refreshToken);
|
|
2197
2199
|
}
|