[seam-commits] Seam SVN: r7384 - trunk/src/main/org/jboss/seam/security.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Feb 6 09:07:36 EST 2008
Author: shane.bryzak at jboss.com
Date: 2008-02-06 09:07:36 -0500 (Wed, 06 Feb 2008)
New Revision: 7384
Modified:
trunk/src/main/org/jboss/seam/security/Identity.java
Log:
modified logic for alreadyLoggedIn test
Modified: trunk/src/main/org/jboss/seam/security/Identity.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/Identity.java 2008-02-06 12:36:18 UTC (rev 7383)
+++ trunk/src/main/org/jboss/seam/security/Identity.java 2008-02-06 14:07:36 UTC (rev 7384)
@@ -209,12 +209,14 @@
{
try
{
- if (!authenticate())
+ if (isLoggedIn(false) && isCredentialsSet())
{
if (Events.exists()) Events.instance().raiseEvent(EVENT_ALREADY_LOGGED_IN);
return "loggedIn";
}
+ authenticate();
+
if ( log.isDebugEnabled() )
{
log.debug("Login successful for: " + getUsername());
@@ -250,10 +252,9 @@
/**
*
- * @return boolean true if authentication is attempted, false if it is not.
* @throws LoginException
*/
- public boolean authenticate()
+ public void authenticate()
throws LoginException
{
// If we're already authenticated, then don't authenticate again
@@ -262,12 +263,7 @@
principal = null;
subject = new Subject();
authenticate( getLoginContext() );
- return true;
}
- else
- {
- return false;
- }
}
protected void authenticate(LoginContext loginContext)
More information about the seam-commits
mailing list