Skip to content

Commit

Permalink
Make it so that expiration does not close windows, so you do not lose…
Browse files Browse the repository at this point in the history
… your work

Signed-off-by: 1000TurquoisePogs <[email protected]>
  • Loading branch information
1000TurquoisePogs committed Jan 14, 2020
1 parent 13840d3 commit 8ee7044
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,12 @@ export class AuthenticationManager {
//requestLogin() used to exist here but it was counter-intuitive in behavior to requestLogout.
//This was not documented and therefore has been removed to prevent misuse and confusion.

private doLoggoutInner(reason: LoginScreenChangeReason): void {
private doLogoutInner(reason: LoginScreenChangeReason): void {
const windowManager: MVDWindowManagement.WindowManagerServiceInterface =
this.injector.get(MVDWindowManagement.Tokens.WindowManagerToken);
windowManager.closeAllWindows();
if (reason == LoginScreenChangeReason.UserLogout) {
windowManager.closeAllWindows();
}
this.performLogout().subscribe(
response => {
this.loginScreenVisibilityChanged.emit(reason);
Expand All @@ -149,7 +151,7 @@ export class AuthenticationManager {
}

requestLogout(): void {
this.doLoggoutInner(LoginScreenChangeReason.UserLogout);
this.doLogoutInner(LoginScreenChangeReason.UserLogout);
}

private performPostLoginActions(): Observable<any> {
Expand Down Expand Up @@ -216,7 +218,7 @@ export class AuthenticationManager {
expirationInMS: logoutAfterWarnTimer});
this.expirationWarning = setTimeout(()=> {
this.log.warn(`Session timeout reached. Clearing desktop for new login.`);
this.doLoggoutInner(LoginScreenChangeReason.SessionExpired);
this.doLogoutInner(LoginScreenChangeReason.SessionExpired);
},logoutAfterWarnTimer);
},warnTimer);
this.log.debug(`Set session timeout watcher to notify ${warnTimer}ms before expiration`);
Expand Down

0 comments on commit 8ee7044

Please sign in to comment.