Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update from develop #2360

Merged
merged 2 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion obp-api/src/main/resources/props/sample.props.template
Original file line number Diff line number Diff line change
Expand Up @@ -1290,4 +1290,7 @@ validate_iban=false

# This returns Regulated Entities
# sample props regulated_entities = [{"certificate_authority_ca_owner_id":"CY_CBC","entity_certificate_public_key":"-----BEGIN CERTIFICATE-----MIICsjCCAZqgAwIBAgIGAYwQ62R0MA0GCSqGSIb3DQEBCwUAMBoxGDAWBgNVBAMMD2FwcC5leGFtcGxlLmNvbTAeFw0yMzExMjcxMzE1MTFaFw0yNTExMjYxMzE1MTFaMBoxGDAWBgNVBAMMD2FwcC5leGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK9WIodZHWzKyCcf9YfWEhPURbfO6zKuMqzHN27GdqHsVVEGxP4F/J4mso+0ENcRr6ur4u81iREaVdCc40rHDHVJNEtniD8Icbz7tcsqAewIVhc/q6WXGqImJpCq7hA0m247dDsaZT0lb/MVBiMoJxDEmAE/GYYnWTEn84R35WhJsMvuQ7QmLvNg6RkChY6POCT/YKe9NKwa1NqI1U+oA5RFzAaFtytvZCE3jtp+aR0brL7qaGfgxm6B7dEpGyhg0NcVCV7xMQNq2JxZTVdAr6lcsRGaAFulakmW3aNnmK+L35Wu8uW+OxNxwUuC6f3b4FVBa276FMuUTRfu7gc+k6kCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAAU5CjEyAoyTn7PgFpQD48ZNPuUsEQ19gzYgJvHMzFIoZ7jKBodjO5mCzWBcR7A4mpeAsdyiNBl2sTiZscSnNqxk61jVzP5Ba1D7XtOjjr7+3iqowrThj6BY40QqhYh/6BSY9fDzVZQiHnvlo6ZUM5kUK6OavZOovKlp5DIl5sGqoP0qAJnpQ4nhB2WVVsKfPlOXc+2KSsbJ23g9l8zaTMr+X0umlvfEKqyEl1Fa2L1dO0y/KFQ+ILmxcZLpRdq1hRAjd0quq9qGC8ucXhRWDgM4hslVpau0da68g0aItWNez3mc5lB82b3dcZpFMzO41bgw7gvw10AvvTfQDqEYIuQ==-----END CERTIFICATE-----","entity_code":"PSD_PICY_CBC!12345","entity_type":"PSD_PI","entity_address":"EXAMPLE COMPANY LTD, 5 SOME STREET","entity_town_city":"SOME CITY","entity_post_code":"1060","entity_country":"CY","entity_web_site":"www.example.com","services":[{"CY":["PS_010","PS_020","PS_03C","PS_04C"]}]}]
regulated_entities = []
regulated_entities = []


# Note: For secure and http only settings for cookies see resources/web.xml which is mentioned in the README.md
9 changes: 7 additions & 2 deletions obp-api/src/main/scala/bootstrap/liftweb/Boot.scala
Original file line number Diff line number Diff line change
Expand Up @@ -756,25 +756,30 @@ 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 {
case Full(user) =>
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.")
}
}
}
Expand Down
Loading