private static final long serialVersionUID = 1L;
@Override
public boolean signIn(String username, String password)
{
WaspSession secureSession = (WaspSession) getSession();
if (secureSession.isUserAuthenticated() && getLoggedInUser() != null)
{
secureSession.logoff(getLoggedInUser());
secureSession.invalidateNow();
}
MyLoginContext userContext = new MyLoginContext(username, password);
try
{
secureSession.login(userContext);
setLoggedInUser(userContext);
}
catch (LoginException e)
{
log.error("Could not login " + username, e);