Author: shane.bryzak(a)jboss.com
Date: 2008-06-04 05:26:38 -0400 (Wed, 04 Jun 2008)
New Revision: 8324
Modified:
trunk/src/main/org/jboss/seam/security/Identity.java
Log:
explicit check that authentication is successful upon calling login(), if not, throw an
exception
Modified: trunk/src/main/org/jboss/seam/security/Identity.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/Identity.java 2008-06-04 09:03:33 UTC (rev
8323)
+++ trunk/src/main/org/jboss/seam/security/Identity.java 2008-06-04 09:26:38 UTC (rev
8324)
@@ -222,6 +222,11 @@
authenticate();
+ if (!isLoggedIn(false))
+ {
+ throw new LoginException();
+ }
+
if ( log.isDebugEnabled() )
{
log.debug("Login successful for: " + getUsername());
@@ -239,8 +244,9 @@
log.debug("Login failed for: " + getUsername(), ex);
}
if (Events.exists()) Events.instance().raiseEvent(EVENT_LOGIN_FAILED, ex);
- return null;
}
+
+ return null;
}
/**
Show replies by date