org.chorem.bow.action
Class LoginAction

java.lang.Object
  extended by com.opensymphony.xwork2.ActionSupport
      extended by org.chorem.bow.action.BowBaseAction
          extended by org.chorem.bow.action.LoginAction
All Implemented Interfaces:
com.opensymphony.xwork2.Action, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, com.opensymphony.xwork2.ValidationAware, Serializable, org.apache.struts2.interceptor.ServletRequestAware, org.apache.struts2.interceptor.SessionAware

public class LoginAction
extends BowBaseAction
implements org.apache.struts2.interceptor.ServletRequestAware

authentifie l'utilisateur et place son objet User dans la bow session

Author:
poussin
See Also:
Serialized Form

Field Summary
protected  String email
           
protected  String password
           
protected  javax.servlet.http.HttpServletRequest servletRequest
           
 
Fields inherited from class org.chorem.bow.action.BowBaseAction
CONTEXT_ACTION_KEY, log, session, UNTRANSLATED_MARKER
 
Fields inherited from class com.opensymphony.xwork2.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork2.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
LoginAction()
           
 
Method Summary
protected  BowUser checkLogin(String email, String password)
          Check password in solr index, if fail try to check password admin in config file
 String execute()
          Authenticates the user if his email and password are valid
 String getEmail()
           
 String getPassword()
           
 void setEmail(String email)
           
 void setPassword(String password)
           
 void setServletRequest(javax.servlet.http.HttpServletRequest request)
           
 
Methods inherited from class org.chorem.bow.action.BowBaseAction
getBowProxy, getBowSession, getSafeText, getText, getText, getText, getText, getText, getText, getText, getText, getText, setSession
 
Methods inherited from class com.opensymphony.xwork2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, doDefault, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, pause, setActionErrors, setActionMessages, setFieldErrors, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

email

protected String email

password

protected String password

servletRequest

protected javax.servlet.http.HttpServletRequest servletRequest
Constructor Detail

LoginAction

public LoginAction()
Method Detail

getEmail

public String getEmail()

setEmail

public void setEmail(String email)

getPassword

public String getPassword()

setPassword

public void setPassword(String password)

setServletRequest

public void setServletRequest(javax.servlet.http.HttpServletRequest request)
Specified by:
setServletRequest in interface org.apache.struts2.interceptor.ServletRequestAware

checkLogin

protected BowUser checkLogin(String email,
                             String password)
Check password in solr index, if fail try to check password admin in config file

Parameters:
email -
password -
Returns:

execute

public String execute()
Authenticates the user if his email and password are valid

Specified by:
execute in interface com.opensymphony.xwork2.Action
Overrides:
execute in class com.opensymphony.xwork2.ActionSupport


Copyright © 2010-2011 CodeLutin. All Rights Reserved.