info.joseluismartin.auth
Class AuthManager

java.lang.Object
  extended by info.joseluismartin.auth.AuthManager
All Implemented Interfaces:
AuthService

public class AuthManager
extends Object
implements AuthService

An Auth Manager that uses AuthStrategy to authorize users

Author:
Jose Luis Martin - (jlm@joseluismartin.info)

Constructor Summary
AuthManager()
           
 
Method Summary
 boolean authUser(User user, String password)
          Autenticate a User that was identified by password
 AuthStrategy getAuthStrategy()
          Getter for AuthStrategy
 UserDao getUserDao()
           
 void setAuthStrategy(AuthStrategy authStrategy)
          Setter for AuthStrategy
 void setUserDao(UserDao userDao)
           
 boolean validate(String username, String password)
          Validate a user
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthManager

public AuthManager()
Method Detail

authUser

public boolean authUser(User user,
                        String password)
Autenticate a User that was identified by password

Parameters:
user - the user to autenticate
password - plain user supplied password
Returns:
true if password is valid

validate

public final boolean validate(String username,
                              String password)
Validate a user

Specified by:
validate in interface AuthService
Parameters:
username - the username
password - the supplied user password
Returns:
true if password matchs.

getAuthStrategy

public AuthStrategy getAuthStrategy()
Getter for AuthStrategy

Returns:
the authStrategy

setAuthStrategy

public void setAuthStrategy(AuthStrategy authStrategy)
Setter for AuthStrategy

Parameters:
authStrategy - the authStrategy to set

getUserDao

public UserDao getUserDao()
Returns:
the userDao

setUserDao

public void setUserDao(UserDao userDao)
Parameters:
userDao - the userDao to set


Copyright © 2012 JDAL. All Rights Reserved.