[jboss-cvs] jboss-seam/seam-gen/src ...
Gavin King
gavin.king at jboss.com
Tue Feb 6 19:06:40 EST 2007
User: gavin
Date: 07/02/06 19:06:40
Modified: seam-gen/src Authenticator.java
Log:
update to latest security pkg
Revision Changes Path
1.2 +7 -4 jboss-seam/seam-gen/src/Authenticator.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Authenticator.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-gen/src/Authenticator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- Authenticator.java 31 Jan 2007 04:07:27 -0000 1.1
+++ Authenticator.java 7 Feb 2007 00:06:40 -0000 1.2
@@ -1,10 +1,10 @@
package @actionPackage@;
-import java.util.Set;
-
+import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.log.Log;
+import org.jboss.seam.security.Identity;
@Name("authenticator")
@@ -12,12 +12,15 @@
{
@Logger Log log;
- public boolean authenticate(String username, String password, Set<String> roles)
+ @In Identity identity;
+
+ public boolean authenticate()
{
- log.info("authenticating #0", username);
+ log.info("authenticating #0", identity.getUsername());
//write your authentication logic here,
//return true if the authentication was
//successful, false otherwise
+ identity.addRole("admin");
return true;
}
}
More information about the jboss-cvs-commits
mailing list