Class RecordSecurityEventUseCase

java.lang.Object
com.irurueta.authserver.authorization.application.mfa.RecordSecurityEventUseCase

@Service @Transactional public class RecordSecurityEventUseCase extends Object
Use case that records a security event (login, second factor, lockout, trusted device) in the audit log.
  • Field Details

    • securityEventRepository

      private final SecurityEventRepository securityEventRepository
      Port that stores the security events.
    • clock

      private final Clock clock
      Source of the current time.
  • Constructor Details

    • RecordSecurityEventUseCase

      public RecordSecurityEventUseCase()
  • Method Details

    • execute

      public void execute(SecurityEventType type, UUID userId, String username, String detail)
      Records an event that happened now.
      Parameters:
      type - kind of event.
      userId - identifier of the user, or null when the user is unknown.
      username - name the user presented, or null.
      detail - extra information, or null.