Loading src/main/java/es/redmic/exception/common/ExceptionType.java +2 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ public enum ExceptionType implements ExceptionTypeItfc { PASSWORD_NOT_MATCH(Constants.PASSWORD_NOT_MATCH), RESET_PASSWORD_TIMEOUT(Constants.RESET_PASSWORD_TIMEOUT), TOKEN_NOT_FOUND(Constants.TOKEN_NOT_FOUND), RECAPTCHA_NOT_VALID(Constants.RECAPTCHA_NOT_VALID), // Security NOT_ALLOWED_EXCEPTION(Constants.NOT_ALLOWED_EXCEPTION), Loading Loading @@ -160,6 +161,7 @@ public enum ExceptionType implements ExceptionTypeItfc { PASSWORD_NOT_MATCH = "PasswordNotMatch", RESET_PASSWORD_TIMEOUT = "ResetPasswordTimeOut", TOKEN_NOT_FOUND = "TokenNotFound", RECAPTCHA_NOT_VALID = "RecaptchaNotValid", // Security NOT_ALLOWED_EXCEPTION = "NotAllowedException", Loading src/main/java/es/redmic/exception/user/RecaptchaNotValidException.java 0 → 100644 +14 −0 Original line number Diff line number Diff line package es.redmic.exception.user; import es.redmic.exception.common.BadRequestException; import es.redmic.exception.common.ExceptionType; public class RecaptchaNotValidException extends BadRequestException { private static final long serialVersionUID = 6714485190161856195L; public RecaptchaNotValidException() { super(ExceptionType.RECAPTCHA_NOT_VALID); } } src/main/resources/i18n/messages_en_EN.properties +1 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ ActivateAccountTimeOut=Error. Tiempo para activar la cuenta excedido. PasswordNotMatch=Error. The password does not match the old one. ResetPasswordTimeOut=Error. Time to change the password exceeded. TokenNotFound=Error. Resource not accessible. RecaptchaNotValid=Error. Recaptcha is'nt valid. #Task IngestPersistenceDataException=Error. The data could not be saved. Loading src/main/resources/i18n/messages_es_ES.properties +1 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ ActivateAccountTimeOut=Error. Tiempo para activar la cuenta excedido. PasswordNotMatch=Error. La contraseña introducida no coincide con la antigua. ResetPasswordTimeOut=Error. Tiempo para cambiar la contraseña excedido. TokenNotFound=Error. Recurso no accesible. RecaptchaNotValid=Error. El recaptcha no es válido. #Task IngestPersistenceDataException=Error. No se ha podido guardar los datos. Loading src/test/java/es/redmic/test/unit/exception/user/RecaptchaNotValidExceptionTest.java 0 → 100644 +18 −0 Original line number Diff line number Diff line package es.redmic.test.unit.exception.user; import java.io.IOException; import org.junit.Test; import es.redmic.exception.common.ExceptionType; import es.redmic.exception.user.RecaptchaNotValidException; import es.redmic.test.unit.exception.common.BaseExceptionTest; public class RecaptchaNotValidExceptionTest extends BaseExceptionTest { @Test public void checkPattern_IsEqualToMessage_WhenNoLocaleSet() throws IOException { checkMessage(new RecaptchaNotValidException(), ExceptionType.RECAPTCHA_NOT_VALID.toString(), null); } } Loading
src/main/java/es/redmic/exception/common/ExceptionType.java +2 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ public enum ExceptionType implements ExceptionTypeItfc { PASSWORD_NOT_MATCH(Constants.PASSWORD_NOT_MATCH), RESET_PASSWORD_TIMEOUT(Constants.RESET_PASSWORD_TIMEOUT), TOKEN_NOT_FOUND(Constants.TOKEN_NOT_FOUND), RECAPTCHA_NOT_VALID(Constants.RECAPTCHA_NOT_VALID), // Security NOT_ALLOWED_EXCEPTION(Constants.NOT_ALLOWED_EXCEPTION), Loading Loading @@ -160,6 +161,7 @@ public enum ExceptionType implements ExceptionTypeItfc { PASSWORD_NOT_MATCH = "PasswordNotMatch", RESET_PASSWORD_TIMEOUT = "ResetPasswordTimeOut", TOKEN_NOT_FOUND = "TokenNotFound", RECAPTCHA_NOT_VALID = "RecaptchaNotValid", // Security NOT_ALLOWED_EXCEPTION = "NotAllowedException", Loading
src/main/java/es/redmic/exception/user/RecaptchaNotValidException.java 0 → 100644 +14 −0 Original line number Diff line number Diff line package es.redmic.exception.user; import es.redmic.exception.common.BadRequestException; import es.redmic.exception.common.ExceptionType; public class RecaptchaNotValidException extends BadRequestException { private static final long serialVersionUID = 6714485190161856195L; public RecaptchaNotValidException() { super(ExceptionType.RECAPTCHA_NOT_VALID); } }
src/main/resources/i18n/messages_en_EN.properties +1 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ ActivateAccountTimeOut=Error. Tiempo para activar la cuenta excedido. PasswordNotMatch=Error. The password does not match the old one. ResetPasswordTimeOut=Error. Time to change the password exceeded. TokenNotFound=Error. Resource not accessible. RecaptchaNotValid=Error. Recaptcha is'nt valid. #Task IngestPersistenceDataException=Error. The data could not be saved. Loading
src/main/resources/i18n/messages_es_ES.properties +1 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ ActivateAccountTimeOut=Error. Tiempo para activar la cuenta excedido. PasswordNotMatch=Error. La contraseña introducida no coincide con la antigua. ResetPasswordTimeOut=Error. Tiempo para cambiar la contraseña excedido. TokenNotFound=Error. Recurso no accesible. RecaptchaNotValid=Error. El recaptcha no es válido. #Task IngestPersistenceDataException=Error. No se ha podido guardar los datos. Loading
src/test/java/es/redmic/test/unit/exception/user/RecaptchaNotValidExceptionTest.java 0 → 100644 +18 −0 Original line number Diff line number Diff line package es.redmic.test.unit.exception.user; import java.io.IOException; import org.junit.Test; import es.redmic.exception.common.ExceptionType; import es.redmic.exception.user.RecaptchaNotValidException; import es.redmic.test.unit.exception.common.BaseExceptionTest; public class RecaptchaNotValidExceptionTest extends BaseExceptionTest { @Test public void checkPattern_IsEqualToMessage_WhenNoLocaleSet() throws IOException { checkMessage(new RecaptchaNotValidException(), ExceptionType.RECAPTCHA_NOT_VALID.toString(), null); } }