[jboss-cvs] jboss-seam/examples/seamspace/src/org/jboss/seam/example/seamspace ...
Gavin King
gavin.king at jboss.com
Thu Feb 8 01:22:51 EST 2007
User: gavin
Date: 07/02/08 01:22:51
Modified: examples/seamspace/src/org/jboss/seam/example/seamspace
Register.java RegisterAction.java
Log:
use built-in component
Revision Changes Path
1.9 +0 -4 jboss-seam/examples/seamspace/src/org/jboss/seam/example/seamspace/Register.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Register.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/seamspace/src/org/jboss/seam/example/seamspace/Register.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- Register.java 2 Feb 2007 23:16:48 -0000 1.8
+++ Register.java 8 Feb 2007 06:22:51 -0000 1.9
@@ -24,9 +24,5 @@
boolean isVerified();
- String getCaptchaId();
- String getVerifyCaptcha();
- void setVerifyCaptcha(String verifyCaptcha);
-
void destroy();
}
1.11 +0 -34 jboss-seam/examples/seamspace/src/org/jboss/seam/example/seamspace/RegisterAction.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: RegisterAction.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/seamspace/src/org/jboss/seam/example/seamspace/RegisterAction.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- RegisterAction.java 2 Feb 2007 23:16:48 -0000 1.10
+++ RegisterAction.java 8 Feb 2007 06:22:51 -0000 1.11
@@ -1,6 +1,5 @@
package org.jboss.seam.example.seamspace;
-import java.rmi.server.UID;
import java.util.Date;
import java.util.HashSet;
@@ -16,7 +15,6 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.core.FacesMessages;
-import org.jboss.seam.security.CaptchaService;
import org.jboss.seam.security.Identity;
@Stateful
@@ -46,14 +44,10 @@
private boolean verified;
- private String captchaId;
- private String verifyCaptcha;
-
@Factory("newMember") @Begin
public void start()
{
newMember = new Member();
- captchaId = new UID().toString().replace(":", "-");
}
public void next()
@@ -69,19 +63,6 @@
newMember.setHashedPassword(Hash.instance().hash(password));
- try
- {
- if (!CaptchaService.instance().getService().validateResponseForID(
- getCaptchaId(), verifyCaptcha))
- {
- FacesMessages.instance().add("verifyCaptcha", "Verification incorrect");
- verified = false;
- }
- }
- catch (Exception ex)
- {
- verified = false;
- }
}
@End
@@ -171,21 +152,6 @@
return verified;
}
- public String getCaptchaId()
- {
- return captchaId;
- }
-
- public String getVerifyCaptcha()
- {
- return verifyCaptcha;
- }
-
- public void setVerifyCaptcha(String verifyCaptcha)
- {
- this.verifyCaptcha = verifyCaptcha;
- }
-
@Destroy @Remove
public void destroy() {}
}
More information about the jboss-cvs-commits
mailing list