kotkabeans
Class Login

java.lang.Object
  |
  +--kotkabeans.Login

public class Login
extends java.lang.Object

is used to check user name and password.


Constructor Summary
Login()
           
 
Method Summary
static User authenticate(java.lang.String acc, java.lang.String passw)
          Checks username and password. if those are correct, method initializes user object with users personal data retrieved from databse (language, organisation).
static User authenticate(java.lang.String acc, java.lang.String passw, java.lang.String ipAddress)
           
protected static java.lang.String trimString(java.lang.String value)
          Deprecated. 24.10.2002 by KK -no use for this method?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Login

public Login()
Method Detail

trimString

protected static java.lang.String trimString(java.lang.String value)
Deprecated. 24.10.2002 by KK -no use for this method?

Removes spaces from a string. This method is needed because used database returns fixed-sized strings which are padded with spaces.

Parameters:
value - String to be trimmed
Returns:
Given string without extra spaces

authenticate

public static User authenticate(java.lang.String acc,
                                java.lang.String passw)
Checks username and password. if those are correct, method initializes user object with users personal data retrieved from databse (language, organisation). Last login time is updated to the database.

Parameters:
acc - Username which is typed in at the login page.
passw - Password which user typed in at the login page.
Returns:
Initialized User-object. If authentication fails null is returned.

authenticate

public static User authenticate(java.lang.String acc,
                                java.lang.String passw,
                                java.lang.String ipAddress)