Package service
Class AuthenticationService
java.lang.Object
service.AuthenticationService
Service class for user authentication in the banking system.
Handles login verification for customers, employees, and managers.
- Author:
- TAMIL MUGHILAN
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAuthenticationService
(DataStorage dataStorage) Creates a new AuthenticationService with the specified data storage. -
Method Summary
Modifier and TypeMethodDescriptionauthenticate
(String email, String password) Authenticates a user with email and password.
-
Field Details
-
dataStorage
-
-
Constructor Details
-
AuthenticationService
Creates a new AuthenticationService with the specified data storage.- Parameters:
dataStorage
- the data storage implementation to use
-
-
Method Details
-
authenticate
Authenticates a user with email and password. Checks customers, employees, and managers for valid credentials.- Parameters:
email
- the user's email addresspassword
- the user's password- Returns:
- authentication result with user details and role
- Throws:
SQLException
- if database error occurs
-