Class UserSignIn
java.lang.Object
application.user.UserSignIn
The UserSignIn class handles the process of user authentication.
It verifies the input credentials (login and password) against the stored user data.
The password is validated through hashing and comparison with the stored hash.
-
Constructor Summary
ConstructorsConstructorDescriptionUserSignIn(PasswordHasher hasher, UserRepository repo) Constructs aUserSignIninstance responsible for user authentication. -
Method Summary
-
Constructor Details
-
UserSignIn
Constructs aUserSignIninstance responsible for user authentication. It handles the process of verifying user credentials by comparing the provided input with stored data in the repository and validating the password through hashing.- Parameters:
hasher- aPasswordHasherimplementation used to hash and validate user passwords.repo- aUserRepositoryimplementation that stores user authentication data.
-
-
Method Details
-
execute
Execute methods, that takes in inputted login and password. Checks via UserRepository if login exists in database. Compares hashed input password with hashed password in database.- Parameters:
login- inputted login by userpassword- inputted password by user- Returns:
- user object, if it exists.
-