org.caleigo.security
Class DataSourceLoginHandler

java.lang.Object
  extended byorg.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

Nested Class Summary
 
Nested classes inherited from class org.caleigo.security.ILoginHandler
ILoginHandler.DefaultLoginHandler
 
Field Summary
protected  IEntityDescriptor mEntityDescriptor
           
protected  IFieldDescriptor mGroupFieldDescriptor
           
protected  IFieldDescriptor mPasswordFieldDescriptor
           
protected  IFieldDescriptor mUserIDFieldDescriptor
           
 
Constructor Summary
DataSourceLoginHandler(IEntityDescriptor entityDescriptor, IFieldDescriptor userIDFieldDescriptor, IFieldDescriptor passwordFieldDescriptor, IFieldDescriptor groupFieldDescriptor)
          Creates a DataSourceLoginManager and initializes it with a IUserLoginHandler.
 
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
 

Field Detail

mEntityDescriptor

protected IEntityDescriptor mEntityDescriptor

mUserIDFieldDescriptor

protected IFieldDescriptor mUserIDFieldDescriptor

mPasswordFieldDescriptor

protected IFieldDescriptor mPasswordFieldDescriptor

mGroupFieldDescriptor

protected IFieldDescriptor mGroupFieldDescriptor
Constructor Detail

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.
Method Detail

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.