Skip to content

Commit

Permalink
Logging on password reset/change (#6901)
Browse files Browse the repository at this point in the history
  • Loading branch information
fm3 authored Mar 6, 2023
1 parent f1a70e4 commit 9cf4215
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/AuthenticationController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ class AuthenticationController @Inject()(
bearerTokenAuthenticatorService.userForToken(passwords.token.trim).futureBox.flatMap {
case Full(user) =>
for {
- <- Fox.successful(logger.info(s"Multiuser ${user._multiUser} reset their password."))
_ <- multiUserDAO.updatePasswordInfo(user._multiUser, passwordHasher.hash(passwords.password1))(
GlobalAccessContext)
_ <- bearerTokenAuthenticatorService.remove(passwords.token.trim)
Expand All @@ -420,6 +421,7 @@ class AuthenticationController @Inject()(
Future.successful(NotFound(Messages("error.noUser")))
case Some(user) =>
for {
- <- Fox.successful(logger.info(s"Multiuser ${user._multiUser} changed their password."))
_ <- multiUserDAO.updatePasswordInfo(user._multiUser, passwordHasher.hash(passwords.password1))
_ <- combinedAuthenticatorService.discard(request.authenticator, Ok)
userEmail <- userService.emailFor(user)
Expand Down

0 comments on commit 9cf4215

Please sign in to comment.