~jan0sch/smederee

Showing 11 changes starting from 9ebc1e945f81b8bf66d04108aba5bf7cd69e0bd4.
2023-08-03 (Thu), 5:28 PM - Jens Grassel - 9ebc1e945f81b8bf66d04108aba5bf7cd69e0bd4

Hub: Add forgot password functionality.

- extend `AuthenticationRepository` with `deleteAllUserSessions` to be able to
  enforce a logout of all current sessions
- add routing, repository, e-mail and html templates for reset/forgot password
  functionality
- add tests and more test helper functions

A user can enter their email address and a reset token will be generated and
and email sent to the user. In case of a non existing email the delay for the
"sent page" is randomised to avoid an instant (too fast) feedback which might
be used to guess email addresses.

The link sent in the email can be used to open a form only once in which the
password can be reset. The correct username associated with the account / email
must be entered by the user. The processing logic checks also that the reset
token must match / exist for the user account.

When the password is changed all currently active user sessions are deleted.
Summary of changes
10 files added
  • modules/hub/src/main/scala/de/smederee/hub/ChangePasswordForm.scala
  • modules/hub/src/main/scala/de/smederee/hub/DoobieResetPasswordRepository.scala
  • modules/hub/src/main/scala/de/smederee/hub/ResetPasswordForm.scala
  • modules/hub/src/main/scala/de/smederee/hub/ResetPasswordRepository.scala
  • modules/hub/src/main/scala/de/smederee/hub/ResetPasswordRoutes.scala
  • modules/hub/src/main/twirl/de/smederee/hub/views/changePassword.scala.html
  • modules/hub/src/main/twirl/de/smederee/hub/views/emails/reset.scala.txt
  • modules/hub/src/main/twirl/de/smederee/hub/views/reset.scala.html
  • modules/hub/src/main/twirl/de/smederee/hub/views/resetSent.scala.html
  • modules/hub/src/test/scala/de/smederee/hub/DoobieResetPasswordRepositoryTest.scala
9 files modified with 142 lines added and 1 lines removed
  • modules/hub/src/main/resources/messages.properties with 13 added and 0 removed lines
  • modules/hub/src/main/scala/de/smederee/hub/Account.scala with 6 added and 1 removed lines
  • modules/hub/src/main/scala/de/smederee/hub/AuthenticationRepository.scala with 9 added and 0 removed lines
  • modules/hub/src/main/scala/de/smederee/hub/DoobieAuthenticationRepository.scala with 3 added and 0 removed lines
  • modules/hub/src/main/scala/de/smederee/hub/HubServer.scala with 10 added and 0 removed lines
  • modules/hub/src/test/scala/de/smederee/hub/BaseSpec.scala with 69 added and 0 removed lines
  • modules/hub/src/test/scala/de/smederee/hub/DoobieAuthenticationRepositoryTest.scala with 28 added and 0 removed lines
  • modules/hub/src/test/scala/de/smederee/hub/Generators.scala with 2 added and 0 removed lines
  • modules/hub/src/test/scala/de/smederee/hub/TestAuthenticationRepository.scala with 2 added and 0 removed lines
2023-08-03 (Thu), 10:48 AM - Jens Grassel - 9e506252708e08521f491871be0c718a0ddc3a74

HTML: Extend MetaTags model by referrer policies

Summary of changes
2 files modified with 52 lines added and 2 lines removed
  • modules/html-utils/src/main/scala/de/smederee/html/MetaTags.scala with 50 added and 1 removed lines
  • modules/hub/src/main/twirl/de/smederee/hub/views/meta.scala.html with 2 added and 1 removed lines
2023-07-31 (Mon), 8:48 AM - Jens Grassel - b4a353e583756730ac962ad4e42defbd6aa668af

Update scalafmt to 3.7.11

Summary of changes
1 files modified with 1 lines added and 1 lines removed
  • .scalafmt.conf with 1 added and 1 removed lines
2023-07-31 (Mon), 8:43 AM - Jens Grassel - 940a151f77f6bfcfe89a3edea3ce965df7de8056

Update flyway to 9.21.1

Summary of changes
1 files modified with 1 lines added and 1 lines removed
  • build.sbt with 1 added and 1 removed lines
2023-07-31 (Mon), 8:41 AM - Jens Grassel - 804008c6abda3fd1cbdee6f2f88a28293f71edcf

Update Bouncy Castle to 1.76

Summary of changes
1 files modified with 1 lines added and 1 lines removed
  • build.sbt with 1 added and 1 removed lines
2023-07-24 (Mon), 6:48 PM - Jens Grassel - 8a10cb439f354d4a32551937d1d40a67ddc61033

Update http4s to 1.0.0-M40

Summary of changes
4 files modified with 13 lines added and 6 lines removed
  • build.sbt with 7 added and 1 removed lines
  • modules/hub/src/main/scala/de/smederee/hub/HubServer.scala with 4 added and 3 removed lines
  • modules/hub/src/main/scala/de/smederee/hub/VcsRepositoryRoutes.scala with 2 added and 1 removed lines
  • modules/tickets/src/test/scala/de/smederee/tickets/config/SmedereeTicketsConfigurationTest.scala with 0 added and 1 removed lines
2023-07-24 (Mon), 6:20 PM - Jens Grassel - 6e75d719c4c69c1042029c6cd2191ba6d13224de

Update simple java mail to 8.1.3

Summary of changes
1 files modified with 1 lines added and 1 lines removed
  • build.sbt with 1 added and 1 removed lines
2023-07-24 (Mon), 6:20 PM - Jens Grassel - f67721a17399e9b7b5771ee347a136f79766738f

Update spring security to 6.1.2

Summary of changes
1 files modified with 1 lines added and 1 lines removed
  • build.sbt with 1 added and 1 removed lines
2023-07-24 (Mon), 6:19 PM - Jens Grassel - 6ef6f31fe3575a2d8a1ca6eb3000b5c1f4d3d436

Update semanticdb to 4.8.5

Summary of changes
1 files modified with 1 lines added and 1 lines removed
  • project/plugins.sbt with 1 added and 1 removed lines
2023-07-24 (Mon), 6:15 PM - Jens Grassel - 640d527f80f6cd32ce1518544834d1f0f3188e66

Update sbt to 1.9.3

Summary of changes
1 files modified with 1 lines added and 1 lines removed
  • project/build.properties with 1 added and 1 removed lines
2023-07-13 (Thu), 2:45 PM - Jens Grassel - 37e7260bfca1ebee3a155b62b392b0fcce365bce

Update scala-xml to 2.2.0

Summary of changes
1 files modified with 3 lines added and 3 lines removed
  • build.sbt with 3 added and 3 removed lines