Class FindUserAccountUseCase

java.lang.Object
com.irurueta.authserver.authorization.application.password.FindUserAccountUseCase

@Service @Transactional(readOnly=true) public class FindUserAccountUseCase extends Object
Use case that looks a user account up by username. A Spring service, so component scanning registers it and injects its port.
  • Field Details

    • userAccountRepository

      private final UserAccountRepository userAccountRepository
      Port that provides the user accounts.
  • Constructor Details

    • FindUserAccountUseCase

      public FindUserAccountUseCase()
  • Method Details

    • execute

      public Optional<UserAccount> execute(String username)
      Finds the account of a user.
      Parameters:
      username - name the user signs in with.
      Returns:
      the account, or an empty optional when no account has that username.