Class RevokeTrustedDeviceUseCase

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

@Service @Transactional public class RevokeTrustedDeviceUseCase extends Object
Use case that revokes a trusted device of a user, so it asks for the second factor again.
  • Field Details

    • trustedDeviceRepository

      private final TrustedDeviceRepository trustedDeviceRepository
      Port that stores the trusted devices.
    • recordSecurityEventUseCase

      private final RecordSecurityEventUseCase recordSecurityEventUseCase
      Use case that records the audit events.
  • Constructor Details

    • RevokeTrustedDeviceUseCase

      public RevokeTrustedDeviceUseCase()
  • Method Details

    • execute

      public boolean execute(UUID userId, String username, UUID deviceId)
      Revokes a device; a device of another user is never touched.
      Parameters:
      userId - identifier of the owner.
      username - name of the owner, for the audit log.
      deviceId - identifier of the device.
      Returns:
      true if the device existed and was revoked.