Methods Summary |
---|
protected java.lang.String | doExecute()
Session s = getHibernateSession( );
try
{
Customer c = ( Customer ) s.load( Customer.class, _userId );
if ( c.getAccount( ).matchPassword( _password ) )
{
initSession( c );
/* Redirect */
if ( ( _redirectUri != null ) && ( _redirectUri.length( ) > 0 ) )
{
_response.sendRedirect( _redirectUri );
return NONE;
}
/* Normal flow */
return SUCCESS;
}
else
{
addError( "login", getText( "authentication_failed" ) );
return ERROR;
}
}
catch ( ObjectNotFoundException o )
{
addError( "login", getText( "authentication_failed" ) );
return ERROR;
}
finally
{
s.close( );
}
|
public java.lang.String | getPassword()
return _password;
|
public java.lang.String | getUserId()
return _userId;
|
public void | setPassword(java.lang.String password)Sets the password.
_password = password;
|
public void | setServletResponse(javax.servlet.http.HttpServletResponse response)
_response = response;
|
public void | setUserId(java.lang.String login)Sets the login.
_userId = login;
|