@arsedizioni/ars-utils 19.0.14 → 19.0.16
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 +13 -11
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +11 -9
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +11 -9
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
- package/package.json +5 -5
|
@@ -3098,8 +3098,8 @@ class ClipperAuthInterceptor {
|
|
|
3098
3098
|
.pipe(finalize$1(() => this.dialogService.clearBusy()), catchError$1(error => {
|
|
3099
3099
|
if (error.url.startsWith(this.clipperService.serviceUri)) {
|
|
3100
3100
|
if (error instanceof HttpErrorResponse &&
|
|
3101
|
-
|
|
3102
|
-
|
|
3101
|
+
error.status === 401 &&
|
|
3102
|
+
!request.url.includes("/login")) {
|
|
3103
3103
|
return this.handle401Error(request, next);
|
|
3104
3104
|
}
|
|
3105
3105
|
const errorStatus = parseInt(error.status ?? "0");
|
|
@@ -3155,15 +3155,17 @@ class ClipperAuthInterceptor {
|
|
|
3155
3155
|
*/
|
|
3156
3156
|
addTokenToRequest(request, token = null) {
|
|
3157
3157
|
if (request.url.startsWith(this.clipperService.serviceUri)) {
|
|
3158
|
-
if (!
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3158
|
+
if (!this.clipperService.loggedIn()) {
|
|
3159
|
+
if (!token)
|
|
3160
|
+
token = this.clipperService.getToken();
|
|
3161
|
+
if (token) {
|
|
3162
|
+
return request.clone({
|
|
3163
|
+
setHeaders: {
|
|
3164
|
+
Authorization: 'Bearer ' + token,
|
|
3165
|
+
'ngsw-bypass': 'ngsw-bypass'
|
|
3166
|
+
},
|
|
3167
|
+
});
|
|
3168
|
+
}
|
|
3167
3169
|
}
|
|
3168
3170
|
}
|
|
3169
3171
|
return request;
|