Skip to content

Commit

Permalink
Merge pull request #2360 from OpenBankProject/develop
Browse files Browse the repository at this point in the history
update from develop
  • Loading branch information
karmaking committed Jan 8, 2024
2 parents 7816f25 + de9e4ef commit a96c8de
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
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

0 comments on commit a96c8de

Please sign in to comment.