|
@ -57,7 +57,7 @@ public class SysService {
|
57
|
57
|
|
58
|
58
|
private String phoneRetrievePasswordReplaceKey;
|
59
|
59
|
private String phoneRetrievePasswordContentTemplate;
|
60
|
|
private long timeLimitWithPhoneRetrievePassword = 3 * 60 * 1000;
|
|
60
|
private long timeLimitWithPhoneRetrievePassword = 60 * 1000;
|
61
|
61
|
|
62
|
62
|
private String mailRetrievePasswordContentTemplate;
|
63
|
63
|
private String mailRetrievePasswordReplaceKey;
|
|
@ -753,15 +753,15 @@ public class SysService {
|
753
|
753
|
|
754
|
754
|
@Post
|
755
|
755
|
@Path("/validCode")
|
756
|
|
public boolean validCode(String state, String vc) {
|
|
756
|
public boolean validCode(String state, String vc) throws JfwBaseException {
|
757
|
757
|
@SuppressWarnings("unchecked")
|
758
|
758
|
StateCode<String, String> sc = (StateCode<String, String>) JfwAppContext
|
759
|
759
|
.getCachedObject(state);
|
760
|
760
|
if (sc == null) {
|
761
|
|
return false;
|
|
761
|
throw new JfwBaseException("Verification state error(state码错误)!");
|
762
|
762
|
}
|
763
|
763
|
if (sc.getExpiredTime() < System.currentTimeMillis()) {
|
764
|
|
return false;
|
|
764
|
throw new JfwBaseException("Validation timeout(验证超时)!");
|
765
|
765
|
}
|
766
|
766
|
return sc.getValue().equals(vc);
|
767
|
767
|
}
|