org.caleigo.security
Class DataSourceLoginHandler
java.lang.Object
org.caleigo.security.DataSourceLoginHandler
- All Implemented Interfaces:
- ILoginHandler
- public class DataSourceLoginHandler
- extends java.lang.Object
- implements ILoginHandler
A login manager that uses an IDataSource to check the validity of user logins.
- Version:
- 1.00
- Author:
- Mattias Hagstrand
Method Summary |
UserInfo |
login(java.lang.Object loginInfo)
Tries to log in a user. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mEntityDescriptor
protected IEntityDescriptor mEntityDescriptor
mUserIDFieldDescriptor
protected IFieldDescriptor mUserIDFieldDescriptor
mPasswordFieldDescriptor
protected IFieldDescriptor mPasswordFieldDescriptor
mGroupFieldDescriptor
protected IFieldDescriptor mGroupFieldDescriptor
DataSourceLoginHandler
public DataSourceLoginHandler(IEntityDescriptor entityDescriptor,
IFieldDescriptor userIDFieldDescriptor,
IFieldDescriptor passwordFieldDescriptor,
IFieldDescriptor groupFieldDescriptor)
- Creates a DataSourceLoginManager and initializes it with a IUserLoginHandler.
- Parameters:
entityDescriptor
- the IEntityDescriptor that is used to get user information.userIDFieldDescriptor
- the IFieldDescriptor that is used to get the user id.passwordFieldDescriptor
- the IFieldDescriptor that is used to get the password.
login
public UserInfo login(java.lang.Object loginInfo)
throws java.lang.SecurityException
- Description copied from interface:
ILoginHandler
- Tries to log in a user.
- Specified by:
login
in interface ILoginHandler
- Parameters:
loginInfo
- An object that contains login information, such as user name, password.
- Returns:
- A UserInfo object if succesfull,
null
otherwise.
- Throws:
java.lang.SecurityException
- if the login fails.
Copyright © 2005 Caleigo. All Rights Reserved.