Skip to content

Commit

Permalink
refactor: simplify code
Browse files Browse the repository at this point in the history
- by merging cases
  • Loading branch information
peterhaochen47 committed Feb 8, 2024
1 parent 60640e8 commit 8bf9413
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ public JdbcUnsuccessfulLoginCountingAuditService(
@Override
public void log(AuditEvent auditEvent, String zoneId) {
switch (auditEvent.getType()) {
case UserAuthenticationSuccess:
case PasswordChangeSuccess:
resetAuthenticationEvents(auditEvent, zoneId, UserAuthenticationFailure);
break;
case UserAccountUnlockedEvent:
case UserAuthenticationSuccess, PasswordChangeSuccess, UserAccountUnlockedEvent:
resetAuthenticationEvents(auditEvent, zoneId, UserAuthenticationFailure);
break;
case UserAuthenticationFailure:
Expand Down

0 comments on commit 8bf9413

Please sign in to comment.