Package logic

Class User

java.lang.Object
logic.User

public class User extends Object
Represents a user entity and provides methods to interact with user credentials.

Available methods:

  • Constructor Details

    • User

      public User(String username, UserCredentialsDataService userCredentialsDataService)
      Constructs a User object with the specified username and user credentials data service.
      Parameters:
      username - the username of the user
      userCredentialsDataService - the service for user credentials data
  • Method Details

    • checkPassword

      public boolean checkPassword(String password) throws SystemLoginException
      Checks if the provided password matches the password associated with the user's username.
      Parameters:
      password - the password to be checked
      Returns:
      true if the provided password matches the user's password, otherwise false
      Throws:
      SystemLoginException - if an error occurs while retrieving user credentials or if the provided username/password is incorrect