org.javaWebGen.web
Class BaseLoginModel

java.lang.Object
  extended by org.javaWebGen.web.BaseLoginModel

public class BaseLoginModel
extends java.lang.Object


Constructor Summary
BaseLoginModel()
           
 
Method Summary
 boolean isAuthorized(LoginBean login, java.lang.String role)
          is their role authorized to to this role?
 LoginBean login(java.lang.String userId, java.lang.String pass)
          try to login to the app if user id and password are not found it will set the user_name and password to a default Feel free to extend this class to provide you own logic for example throwing an WebAppException exception if login attempts are excessive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseLoginModel

public BaseLoginModel()
Method Detail

login

public LoginBean login(java.lang.String userId,
                       java.lang.String pass)
                throws WebAppException
try to login to the app if user id and password are not found it will set the user_name and password to a default Feel free to extend this class to provide you own logic for example throwing an WebAppException exception if login attempts are excessive

Parameters:
userId -
pass -
Returns:
LoginBean of user logged in
Throws:
WebAppException

isAuthorized

public boolean isAuthorized(LoginBean login,
                            java.lang.String role)
                     throws WebAppException
is their role authorized to to this role?

Parameters:
login -
role -
Returns:
true if authorized
Throws:
WebAppException


Copyright(C) 2003-2006 Kevin Scott - All Rights Reserved.