From edc9ed88f3c72aca1d68dbf379a4f0452dce01ef Mon Sep 17 00:00:00 2001 From: Simon Redfern Date: Fri, 5 Jan 2024 14:27:18 +0100 Subject: [PATCH] Adding more debug around UserLockedChecker --- obp-api/src/main/scala/bootstrap/liftweb/Boot.scala | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/obp-api/src/main/scala/bootstrap/liftweb/Boot.scala b/obp-api/src/main/scala/bootstrap/liftweb/Boot.scala index 286662e310..b4d0725bec 100644 --- a/obp-api/src/main/scala/bootstrap/liftweb/Boot.scala +++ b/obp-api/src/main/scala/bootstrap/liftweb/Boot.scala @@ -756,14 +756,17 @@ class Boot extends MdcLoggable { def onBeginServicing(session: LiftSession, req: Req): Unit = { logger.debug(s"Hello from UsernameLockedChecker.onBeginServicing") checkIsLocked() + logger.debug(s"Bye from UsernameLockedChecker.onBeginServicing") } def onSessionActivate(session: LiftSession): Unit = { logger.debug(s"Hello from UsernameLockedChecker.onSessionActivate") checkIsLocked() + logger.debug(s"Bye from UsernameLockedChecker.onSessionActivate") } def onSessionPassivate(session: LiftSession): Unit = { logger.debug(s"Hello from UsernameLockedChecker.onSessionPassivate") checkIsLocked() + logger.debug(s"Bye from UsernameLockedChecker.onSessionPassivate") } private def checkIsLocked(): Unit = { AuthUser.currentUser match { @@ -771,10 +774,12 @@ class Boot extends MdcLoggable { LoginAttempt.userIsLocked(localIdentityProvider, user.username.get) match { case true => AuthUser.logoutCurrentUser - logger.warn(s"User ${user.username.get} has been logged out due to it has been locked.") + logger.warn(s"checkIsLocked says: User ${user.username.get} has been logged out because it is locked.") case false => // Do nothing + logger.debug(s"checkIsLocked says: User ${user.username.get} is not locked.") } - case _ => // Do nothing + case _ => // No user found + logger.debug(s"checkIsLocked says: No User Found.") } } }