[seam-commits] Seam SVN: r8324 - trunk/src/main/org/jboss/seam/security.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Jun 4 05:26:38 EDT 2008
Author: shane.bryzak at 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;
}
/**
More information about the seam-commits
mailing list