Skip to content

Commit

Permalink
ES-904 (mosip#797)
Browse files Browse the repository at this point in the history
Signed-off-by: ase-101 <sunkadaeanusha@gmail.com>
  • Loading branch information
ase-101 authored Jul 1, 2024
1 parent 76aecd0 commit 7c42eb8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 267 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package io.mosip.esignet.core.util;

import io.mosip.esignet.core.constants.ErrorConstants;
Expand Down Expand Up @@ -65,13 +70,12 @@ public boolean validateCaptcha(String captchaToken) {
return true;
}
log.error("Errors received from CaptchaService: {}", responseWrapper.getErrors()); //NOSONAR responseWrapper is already evaluated to be not null
throw new EsignetException(ErrorConstants.INVALID_CAPTCHA);
}
log.error("Errors received from CaptchaService: {}", responseEntity.getStatusCode());
throw new EsignetException(ErrorConstants.INVALID_CAPTCHA);
} catch (Exception e) {
throw new EsignetException(ErrorConstants.INVALID_CAPTCHA);
log.error("Failed to validate captcha", e);
}
throw new EsignetException(ErrorConstants.INVALID_CAPTCHA);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
*/
package io.mosip.esignet.api.spi;

@Deprecated
public interface CaptchaValidator {


boolean validateCaptcha(String captchaToken);
}
262 changes: 0 additions & 262 deletions esignet-service/src/main/resources/application-dev.properties

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ mosip.esignet.header-filter.paths-to-validate={'${server.servlet.path}/authoriza
#This property is used for captcha validation and allowed values are send-otp and pwd.
# captcha validation is enabled for the auth-factors - otp, pwd, bio and pin.
mosip.esignet.captcha.required=send-otp,pwd,bio,pin
mosip.esignet.captcha.validator-url=${mosipbox.public.url}${server.servlet.path}/v1/captcha/validatecaptcha
mosip.esignet.captcha.validator-url=https://api-internal.dev.mosip.net/v1/captcha/validatecaptcha
mosip.esignet.captcha.module-name=esignet

mosip.esignet.host=localhost
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ mosip.esignet.header-filter.paths-to-validate={'${server.servlet.path}/authoriza
#This property is used for captcha validation and allowed values are send-otp and pwd.
#captcha validation is enabled for send-otp and pwd.
mosip.esignet.captcha.required=pwd
mosip.esignet.captcha.validator-url=${mosipbox.public.url}${server.servlet.path}/v1/captcha/validatecaptcha
mosip.esignet.captcha.validator-url=https://api-internal.dev.mosip.net/v1/captcha/validatecaptcha
mosip.esignet.captcha.module-name=esignet

mosip.esignet.host=http://localhost:8088
Expand Down

0 comments on commit 7c42eb8

Please sign in to comment.