applicationLogic.authentication
Class Login

java.lang.Object
  extended by applicationLogic.authentication.Login

public class Login
extends java.lang.Object

Authenticate user for logging in.

Author:
02leungi

Constructor Summary
Login()
           
 
Method Summary
static java.lang.String[] authenticate(java.lang.String username, java.lang.String password)
          Get the user type of a user with matching 'username' and 'password'.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Login

public Login()
Method Detail

authenticate

public static java.lang.String[] authenticate(java.lang.String username,
                                              java.lang.String password)
Get the user type of a user with matching 'username' and 'password'.

Parameters:
username - User name for authentication.
password - Password for the authentication.
Returns:
A string array of size 2 indicating the user type and OHIP number, who has matching 'username' and 'password'. This first string in the array can be "patient", "physician", or "admin". The second string is a string representation of the ohip number. Null is returned if there is no such user in the system.