@arsedizioni/ars-utils 20.2.26 → 20.2.28
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/clipper.common/index.d.ts +1 -0
- package/evolution.common/index.d.ts +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +1 -2
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +6 -6
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +6 -6
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
- package/package.json +1 -1
- package/support.common/index.d.ts +1 -1
|
@@ -767,7 +767,7 @@ declare class EvolutionService implements OnDestroy {
|
|
|
767
767
|
* Return current JWT token
|
|
768
768
|
* @param refresh: true to get the refresh token. Default is false.
|
|
769
769
|
*/
|
|
770
|
-
getToken(refresh?: boolean): string;
|
|
770
|
+
getToken(refresh?: boolean): string | undefined;
|
|
771
771
|
/**
|
|
772
772
|
* Store login info
|
|
773
773
|
*/
|
|
@@ -2145,7 +2145,6 @@ class ClipperService {
|
|
|
2145
2145
|
const token = this.getAuthToken();
|
|
2146
2146
|
if (!token)
|
|
2147
2147
|
return undefined;
|
|
2148
|
-
console.log(token);
|
|
2149
2148
|
// Parse json object from base64 encoded jwt token
|
|
2150
2149
|
const jwtToken = JSON.parse(atob(token.split('.')[1]));
|
|
2151
2150
|
// Set a timeout to refresh the token a minute before it expires
|
|
@@ -2192,7 +2191,7 @@ class ClipperService {
|
|
|
2192
2191
|
* @param value : the login result
|
|
2193
2192
|
*/
|
|
2194
2193
|
setToken(value) {
|
|
2195
|
-
sessionStorage.setItem('clipper_auth', value.authToken);
|
|
2194
|
+
sessionStorage.setItem('clipper_auth', value.authToken ?? value.token);
|
|
2196
2195
|
if (value.refreshToken) {
|
|
2197
2196
|
sessionStorage.setItem('clipper_refresh', value.refreshToken);
|
|
2198
2197
|
}
|