[jboss-cvs] jboss-seam/examples/seamspace/src/org/jboss/seam/example/seamspace ...
Shane Bryzak
Shane_Bryzak at symantec.com
Tue Jan 30 18:50:20 EST 2007
User: sbryzak2
Date: 07/01/30 18:50:20
Modified: examples/seamspace/src/org/jboss/seam/example/seamspace
Authenticator.java
Log:
reverted
Revision Changes Path
1.7 +5 -4 jboss-seam/examples/seamspace/src/org/jboss/seam/example/seamspace/Authenticator.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Authenticator.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/seamspace/src/org/jboss/seam/example/seamspace/Authenticator.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- Authenticator.java 30 Jan 2007 23:48:07 -0000 1.6
+++ Authenticator.java 30 Jan 2007 23:50:20 -0000 1.7
@@ -6,7 +6,6 @@
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
-import javax.security.auth.login.LoginException;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
@@ -29,8 +28,7 @@
@Out(required = false, scope = SESSION)
private Member authenticatedMember;
- public void authenticate(String username, String password, Set<String> roles)
- throws LoginException
+ public boolean authenticate(String username, String password, Set<String> roles)
{
try
{
@@ -45,10 +43,13 @@
for (MemberRole mr : authenticatedMember.getRoles())
roles.add(mr.getName());
}
+
+ return true;
}
catch (NoResultException ex)
{
- throw new LoginException();
+ FacesMessages.instance().add("Invalid username/password");
+ return false;
}
}
}
More information about the jboss-cvs-commits
mailing list