email token duplication check
This commit is contained in:
parent
1267ad22bc
commit
77e018f99a
|
@ -68,7 +68,9 @@ public class EmailAuthService {
|
||||||
boolean res = this.isValidateTime(auth);
|
boolean res = this.isValidateTime(auth);
|
||||||
|
|
||||||
if (!res) {
|
if (!res) {
|
||||||
throw new OverflowException("The authentication expiration time has passed.", new Throwable());
|
throw new OverflowException(
|
||||||
|
"The authentication expiration time has expired, or the token has been verified.",
|
||||||
|
new Throwable());
|
||||||
}
|
}
|
||||||
|
|
||||||
auth.setAuthConfirmDate(new Date());
|
auth.setAuthConfirmDate(new Date());
|
||||||
|
@ -97,7 +99,9 @@ public class EmailAuthService {
|
||||||
boolean res = this.isValidateTime(auth);
|
boolean res = this.isValidateTime(auth);
|
||||||
|
|
||||||
if (!res) {
|
if (!res) {
|
||||||
throw new OverflowException("The authentication expiration time has passed.", new Throwable());
|
throw new OverflowException(
|
||||||
|
"The authentication expiration time has expired, or the token has been verified.",
|
||||||
|
new Throwable());
|
||||||
}
|
}
|
||||||
|
|
||||||
auth.setAuthConfirmDate(new Date());
|
auth.setAuthConfirmDate(new Date());
|
||||||
|
@ -154,6 +158,10 @@ public class EmailAuthService {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (null != auth.getAuthConfirmDate()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user