Skip to content

Commit

Permalink
Merge pull request #183 from 1000TurquoisePogs/feature/expire-without…
Browse files Browse the repository at this point in the history
…-closing

Session expiration should not close windows
  • Loading branch information
1000TurquoisePogs authored Jan 17, 2020
2 parents 13840d3 + 8ee7044 commit 38183d0
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 38183d0

Please sign in to comment.