@arsedizioni/ars-utils 20.2.22 → 20.2.24
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 +2 -1
- package/evolution.common/index.d.ts +1 -0
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +8 -5
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
- package/package.json +5 -5
- package/support.common/index.d.ts +1 -0
|
@@ -1117,8 +1117,9 @@ declare class ClipperService implements OnDestroy {
|
|
|
1117
1117
|
confirmIdentity(code: string, flags?: number): rxjs.Observable<ApiResult<ClipperLoginResult>>;
|
|
1118
1118
|
/**
|
|
1119
1119
|
* Perform logout
|
|
1120
|
+
* @param soft: true if is a soft logout (mfa and remember tokens remains). Default is false.
|
|
1120
1121
|
*/
|
|
1121
|
-
logout(): rxjs.Observable<any>;
|
|
1122
|
+
logout(soft?: boolean): rxjs.Observable<any>;
|
|
1122
1123
|
/**
|
|
1123
1124
|
* Reset login refresh timer and login state
|
|
1124
1125
|
*/
|
|
@@ -2101,7 +2101,7 @@ class ClipperService {
|
|
|
2101
2101
|
}
|
|
2102
2102
|
else if (message.id === ClipperMessages.LOGOUT) {
|
|
2103
2103
|
if (this.loggedIn()) {
|
|
2104
|
-
this.logout().subscribe(r => {
|
|
2104
|
+
this.logout(true).subscribe(r => {
|
|
2105
2105
|
if (!r.success) {
|
|
2106
2106
|
if (r.message) {
|
|
2107
2107
|
this.dialogService.error("<p>" + r.message + "</p><br><br><hr><p class='small'><i>Per eliminare la configurazione di Clipper accedere a:<br><b>menu > personalizza > collegamenti</b></i></p>", undefined, "Errore di Clipper");
|
|
@@ -2282,7 +2282,7 @@ class ClipperService {
|
|
|
2282
2282
|
autoLogout(onSuccess) {
|
|
2283
2283
|
if (!this.loggedIn())
|
|
2284
2284
|
return;
|
|
2285
|
-
this.logout().subscribe({
|
|
2285
|
+
this.logout(true).subscribe({
|
|
2286
2286
|
next: r => {
|
|
2287
2287
|
if (!r.success) {
|
|
2288
2288
|
this.dialogService.error(r.message, undefined, "Errore in Clipper");
|
|
@@ -2392,15 +2392,18 @@ class ClipperService {
|
|
|
2392
2392
|
}
|
|
2393
2393
|
/**
|
|
2394
2394
|
* Perform logout
|
|
2395
|
+
* @param soft: true if is a soft logout (mfa and remember tokens remains). Default is false.
|
|
2395
2396
|
*/
|
|
2396
|
-
logout() {
|
|
2397
|
+
logout(soft = false) {
|
|
2397
2398
|
return this.httpClient.post(this._serviceUri + '/logout', {}).pipe(finalize(() => {
|
|
2398
2399
|
this.removeKeepAlive();
|
|
2399
2400
|
this.clear(true);
|
|
2400
2401
|
// Remove credentials
|
|
2401
2402
|
localStorage.removeItem('clipper_context');
|
|
2402
|
-
|
|
2403
|
-
|
|
2403
|
+
if (!soft) {
|
|
2404
|
+
localStorage.removeItem('clipper_mfa');
|
|
2405
|
+
localStorage.removeItem('clipper_remember');
|
|
2406
|
+
}
|
|
2404
2407
|
}), catchError((_e) => {
|
|
2405
2408
|
return of([]);
|
|
2406
2409
|
}));
|