Author: shane.bryzak(a)jboss.com
Date: 2008-05-28 22:13:40 -0400 (Wed, 28 May 2008)
New Revision: 8299
Modified:
trunk/src/main/org/jboss/seam/security/FacesSecurityEvents.java
trunk/src/main/org/jboss/seam/web/AuthenticationFilter.java
Log:
fixed broken references
Modified: trunk/src/main/org/jboss/seam/security/FacesSecurityEvents.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/FacesSecurityEvents.java 2008-05-29 01:35:07
UTC (rev 8298)
+++ trunk/src/main/org/jboss/seam/security/FacesSecurityEvents.java 2008-05-29 02:13:40
UTC (rev 8299)
@@ -57,7 +57,7 @@
setDirty();
}
- @Observer(Identity.EVENT_CREDENTIALS_UPDATED)
+ @Observer(Credentials.EVENT_CREDENTIALS_UPDATED)
public void credentialsUpdated()
{
setDirty();
Modified: trunk/src/main/org/jboss/seam/web/AuthenticationFilter.java
===================================================================
--- trunk/src/main/org/jboss/seam/web/AuthenticationFilter.java 2008-05-29 01:35:07 UTC
(rev 8298)
+++ trunk/src/main/org/jboss/seam/web/AuthenticationFilter.java 2008-05-29 02:13:40 UTC
(rev 8299)
@@ -24,6 +24,7 @@
import org.jboss.seam.contexts.Context;
import org.jboss.seam.contexts.SessionContext;
import org.jboss.seam.log.Log;
+import org.jboss.seam.security.Credentials;
import org.jboss.seam.security.Identity;
import org.jboss.seam.security.NotLoggedInException;
import org.jboss.seam.security.digest.DigestRequest;
@@ -130,6 +131,7 @@
{
Context ctx = new SessionContext( new ServletRequestSessionMap(request) );
Identity identity = (Identity) ctx.get(Identity.class);
+ Credentials credentials = (Credentials) ctx.get(Credentials.class);
boolean requireAuth = false;
@@ -150,11 +152,11 @@
}
// Only reauthenticate if username doesn't match Identity.username and user
isn't authenticated
- if (!username.equals(identity.getUsername()) || !identity.isLoggedIn())
+ if (!username.equals(credentials.getUsername()) || !identity.isLoggedIn())
{
try
{
- identity.setPassword(password);
+ credentials.setPassword(password);
authenticate( request, username );
}
catch (Exception ex)
@@ -165,7 +167,7 @@
}
}
- if (!identity.isLoggedIn() && !identity.isCredentialsSet())
+ if (!identity.isLoggedIn() && !credentials.isSet())
{
requireAuth = true;
}
@@ -196,6 +198,7 @@
{
Context ctx = new SessionContext( new ServletRequestSessionMap(request) );
Identity identity = (Identity) ctx.get(Identity.class);
+ Credentials credentials = (Credentials) ctx.get(Credentials.class);
boolean requireAuth = false;
boolean nonceExpired = false;
@@ -247,7 +250,7 @@
}
}
- if (!identity.isLoggedIn() && !identity.isCredentialsSet())
+ if (!identity.isLoggedIn() && !credentials.isSet())
{
requireAuth = true;
}
Show replies by date