Package service

Class AuthenticationService

java.lang.Object
service.AuthenticationService

public class AuthenticationService extends Object
Service class for user authentication in the banking system. Handles login verification for customers, employees, and managers.
Author:
TAMIL MUGHILAN
  • Field Details

  • Constructor Details

    • AuthenticationService

      public AuthenticationService(DataStorage dataStorage)
      Creates a new AuthenticationService with the specified data storage.
      Parameters:
      dataStorage - the data storage implementation to use
  • Method Details

    • authenticate

      public AuthenticationResult authenticate(String email, String password) throws SQLException
      Authenticates a user with email and password. Checks customers, employees, and managers for valid credentials.
      Parameters:
      email - the user's email address
      password - the user's password
      Returns:
      authentication result with user details and role
      Throws:
      SQLException - if database error occurs