diff --git a/authentication/authentication-childauthfilter-impl/pom.xml b/authentication/authentication-childauthfilter-impl/pom.xml
index 4f5db2ef63..b1025167b1 100644
--- a/authentication/authentication-childauthfilter-impl/pom.xml
+++ b/authentication/authentication-childauthfilter-impl/pom.xml
@@ -4,9 +4,9 @@
io.mosip.authentication
authentication-ref-impl-parent
- 1.2.0.2
+ 1.2.0.3-SNAPSHOT
- 1.2.0.2
+ 1.2.0.3-SNAPSHOT
authentication-childauthfilter-impl
authentication-childauthfilter-impl
ID Authentication Filter reference Implementation to check allowed auth types for child
diff --git a/authentication/pom.xml b/authentication/pom.xml
index c8c8a7d4d2..897bccb9db 100644
--- a/authentication/pom.xml
+++ b/authentication/pom.xml
@@ -5,7 +5,7 @@
io.mosip.authentication
authentication-ref-impl-parent
- 1.2.0.2
+ 1.2.0.3-SNAPSHOT
pom
id-authentication Reference Impl Parent
diff --git a/cache-provider-hazelcast/pom.xml b/cache-provider-hazelcast/pom.xml
index 8cbf3dbe9a..ec0fbeb67b 100644
--- a/cache-provider-hazelcast/pom.xml
+++ b/cache-provider-hazelcast/pom.xml
@@ -6,7 +6,7 @@
io.mosip.cacheprovider
cache-provider-hazelcast
- 1.2.0.2
+ 1.2.0.3-SNAPSHOT
diff --git a/cache-provider-redis/pom.xml b/cache-provider-redis/pom.xml
index 933761f4ea..812cb912f8 100644
--- a/cache-provider-redis/pom.xml
+++ b/cache-provider-redis/pom.xml
@@ -6,7 +6,7 @@
io.mosip.cacheprovider
cache-provider-redis
- 1.2.0.2
+ 1.2.0.3-SNAPSHOT
diff --git a/kernel/kernel-ref-idobjectvalidator/pom.xml b/kernel/kernel-ref-idobjectvalidator/pom.xml
index 64500c80e9..3af7b1e534 100644
--- a/kernel/kernel-ref-idobjectvalidator/pom.xml
+++ b/kernel/kernel-ref-idobjectvalidator/pom.xml
@@ -4,12 +4,12 @@
io.mosip.kernel
kernel-ref-parent
- 1.2.0.2
+ 1.2.0.3-SNAPSHOT
kernel-ref-idobjectvalidator
kernel-ref-idobjectvalidator
- 1.2.0.2
+ 1.2.0.3-SNAPSHOT
1.2.0.1
diff --git a/kernel/kernel-smsserviceprovider-msg91/pom.xml b/kernel/kernel-smsserviceprovider-msg91/pom.xml
index 01be00b709..35bca25389 100644
--- a/kernel/kernel-smsserviceprovider-msg91/pom.xml
+++ b/kernel/kernel-smsserviceprovider-msg91/pom.xml
@@ -7,7 +7,7 @@
kernel-smsserviceprovider-msg91
kernel-smsserviceprovider-msg91
https://github.com/mosip/commons
- 1.2.0.2
+ 1.2.0.3-SNAPSHOT
UTF-8
diff --git a/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/impl/SMSServiceProviderImpl.java b/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/impl/SMSServiceProviderImpl.java
index eda398cb61..83bee9147d 100644
--- a/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/impl/SMSServiceProviderImpl.java
+++ b/kernel/kernel-smsserviceprovider-msg91/src/main/java/io/mosip/kernel/smsserviceprovider/msg91/impl/SMSServiceProviderImpl.java
@@ -60,6 +60,9 @@ public class SMSServiceProviderImpl implements SMSServiceProvider {
@Value("${mosip.kernel.sms.unicode:1}")
String unicode;
+ @Value("${mosip.id.validation.identity.phone}")
+ private String phoneRegex;
+
@Override
public SMSResponseDto sendSms(String contactNumber, String message) {
SMSResponseDto smsResponseDTO = new SMSResponseDto();
@@ -85,16 +88,14 @@ public SMSResponseDto sendSms(String contactNumber, String message) {
}
private void validateInput(String contactNumber) {
- if (!StringUtils.isNumeric(contactNumber) || (!inRange(contactNumber.length(), numberMinLength,
- numberMaxLength))) {
+ if (!phoneValidator(contactNumber)) {
throw new InvalidNumberException(SmsExceptionConstant.SMS_INVALID_CONTACT_NUMBER.getErrorCode(),
- SmsExceptionConstant.SMS_INVALID_CONTACT_NUMBER.getErrorMessage() + numberMinLength + "-"
- + numberMaxLength + SmsPropertyConstant.SUFFIX_MESSAGE.getProperty());
+ SmsExceptionConstant.SMS_INVALID_CONTACT_NUMBER.getErrorMessage());
}
}
- private boolean inRange(int value, int min, int max) {
- return (value >= min) && (value <= max);
+ public boolean phoneValidator(String phone) {
+ return phone.matches(phoneRegex);
}
}
\ No newline at end of file
diff --git a/kernel/kernel-smsserviceprovider-msg91/src/test/java/io/mosip/kernel/smsserviceprovider/msg91/test/SmsServiceProviderTest.java b/kernel/kernel-smsserviceprovider-msg91/src/test/java/io/mosip/kernel/smsserviceprovider/msg91/test/SmsServiceProviderTest.java
index a4f769e141..b9f86a8428 100644
--- a/kernel/kernel-smsserviceprovider-msg91/src/test/java/io/mosip/kernel/smsserviceprovider/msg91/test/SmsServiceProviderTest.java
+++ b/kernel/kernel-smsserviceprovider-msg91/src/test/java/io/mosip/kernel/smsserviceprovider/msg91/test/SmsServiceProviderTest.java
@@ -1,114 +1,119 @@
-package io.mosip.kernel.smsserviceprovider.msg91.test;
-
-import static org.mockito.Mockito.when;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mockito;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.test.context.ConfigFileApplicationContextInitializer;
-import org.springframework.boot.test.mock.mockito.MockBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.web.client.RestTemplate;
-import org.springframework.web.util.UriComponentsBuilder;
-
-import io.mosip.kernel.core.notification.exception.InvalidNumberException;
-import io.mosip.kernel.core.notification.model.SMSResponseDto;
-import io.mosip.kernel.smsserviceprovider.msg91.constant.SmsPropertyConstant;
-import io.mosip.kernel.smsserviceprovider.msg91.dto.SmsServerResponseDto;
-import io.mosip.kernel.smsserviceprovider.msg91.impl.SMSServiceProviderImpl;
-
-@RunWith(SpringRunner.class)
-@ContextConfiguration(classes = { ConfigFileApplicationContextInitializer.class, SmsServiceProviderTest.config.class,
- SMSServiceProviderImpl.class })
-public class SmsServiceProviderTest {
-
- @Configuration
- static class config {
-
- @Bean
- public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
- PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer();
- propertySourcesPlaceholderConfigurer.setLocations(new ClassPathResource("application.properties"));
- return propertySourcesPlaceholderConfigurer;
- }
- }
-
- @Autowired
- SMSServiceProviderImpl service;
-
- @MockBean
- RestTemplate restTemplate;
-
- @Value("${mosip.kernel.sms.api}")
- String api;
-
- @Value("${mosip.kernel.sms.authkey}")
- String authkey;
-
- @Value("${mosip.kernel.sms.country.code}")
- String countryCode;
-
- @Value("${mosip.kernel.sms.sender}")
- String senderId;
-
- @Value("${mosip.kernel.sms.route}")
- String route;
-
- @Test
- public void sendSmsTest() {
-
- UriComponentsBuilder sms = UriComponentsBuilder.fromHttpUrl(api)
- .queryParam(SmsPropertyConstant.AUTH_KEY.getProperty(), authkey)
- .queryParam(SmsPropertyConstant.SMS_MESSAGE.getProperty(), "your otp is 4646")
- .queryParam(SmsPropertyConstant.ROUTE.getProperty(), route)
- .queryParam(SmsPropertyConstant.SENDER_ID.getProperty(), senderId)
- .queryParam(SmsPropertyConstant.RECIPIENT_NUMBER.getProperty(), "8987876473")
- .queryParam(SmsPropertyConstant.COUNTRY_CODE.getProperty(), countryCode);
-
- SmsServerResponseDto serverResponse = new SmsServerResponseDto();
- serverResponse.setType("success");
- SMSResponseDto dto = new SMSResponseDto();
- dto.setStatus(serverResponse.getType());
- dto.setMessage("Sms Request Sent");
-
- when(restTemplate.getForEntity(sms.toUriString(), String.class))
- .thenReturn(new ResponseEntity<>(serverResponse.toString(), HttpStatus.OK));
-
- when(restTemplate.postForEntity(Mockito.anyString(), Mockito.eq(Mockito.any()), Object.class))
- .thenReturn(new ResponseEntity<>(serverResponse, HttpStatus.OK));
-
- // assertThat(service.sendSms("8987876473", "your otp is 4646"),
- // is(dto));
-
- }
-
- @Test(expected = InvalidNumberException.class)
- public void invalidContactNumberTest() {
- service.sendSms("jsbchb", "hello your otp is 45373");
- }
-
- @Test(expected = InvalidNumberException.class)
- public void contactNumberMinimumThresholdTest() {
- service.sendSms("78978976", "hello your otp is 45373");
- }
-
- @Test(expected = InvalidNumberException.class)
- public void contactNumberMaximumThresholdTest() {
- service.sendSms("7897897458673484376", "hello your otp is 45373");
- }
-
- @Test
- public void validGateWayTest() {
- service.sendSms("1234567890", "hello your otp is 45373");
- }
-
+package io.mosip.kernel.smsserviceprovider.msg91.test;
+
+import static org.mockito.Mockito.when;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mockito;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.test.mock.mockito.MockBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.web.client.RestTemplate;
+import org.springframework.web.util.UriComponentsBuilder;
+
+import io.mosip.kernel.core.notification.exception.InvalidNumberException;
+import io.mosip.kernel.core.notification.model.SMSResponseDto;
+import io.mosip.kernel.smsserviceprovider.msg91.constant.SmsPropertyConstant;
+import io.mosip.kernel.smsserviceprovider.msg91.dto.SmsServerResponseDto;
+import io.mosip.kernel.smsserviceprovider.msg91.impl.SMSServiceProviderImpl;
+
+@RunWith(SpringRunner.class)
+@ContextConfiguration(classes = { SmsServiceProviderTest.config.class,
+ SMSServiceProviderImpl.class })
+public class SmsServiceProviderTest {
+
+ @Configuration
+ static class config {
+
+ @Bean
+ public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
+ PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer();
+ propertySourcesPlaceholderConfigurer.setLocations(new ClassPathResource("application.properties"));
+ return propertySourcesPlaceholderConfigurer;
+ }
+ }
+
+ @Autowired
+ SMSServiceProviderImpl service;
+
+ @MockBean
+ RestTemplate restTemplate;
+
+ @Value("${mosip.kernel.sms.api}")
+ String api;
+
+ @Value("${mosip.kernel.sms.authkey}")
+ String authkey;
+
+ @Value("${mosip.kernel.sms.country.code}")
+ String countryCode;
+
+ @Value("${mosip.kernel.sms.sender}")
+ String senderId;
+
+ @Value("${mosip.kernel.sms.route}")
+ String route;
+
+ @Value("${mosip.id.validation.identity.phone}")
+ private String phoneRegex;
+
+ @Value("${phone}")
+ private String phone;
+
+ @Test
+ public void sendSmsTest() {
+
+ UriComponentsBuilder sms = UriComponentsBuilder.fromHttpUrl(api)
+ .queryParam(SmsPropertyConstant.AUTH_KEY.getProperty(), authkey)
+ .queryParam(SmsPropertyConstant.SMS_MESSAGE.getProperty(), "your otp is 4646")
+ .queryParam(SmsPropertyConstant.ROUTE.getProperty(), route)
+ .queryParam(SmsPropertyConstant.SENDER_ID.getProperty(), senderId)
+ .queryParam(SmsPropertyConstant.RECIPIENT_NUMBER.getProperty(), "8987876473")
+ .queryParam(SmsPropertyConstant.COUNTRY_CODE.getProperty(), countryCode);
+
+ SmsServerResponseDto serverResponse = new SmsServerResponseDto();
+ serverResponse.setType("success");
+ SMSResponseDto dto = new SMSResponseDto();
+ dto.setStatus(serverResponse.getType());
+ dto.setMessage("Sms Request Sent");
+
+ when(restTemplate.getForEntity(sms.toUriString(), String.class))
+ .thenReturn(new ResponseEntity<>(serverResponse.toString(), HttpStatus.OK));
+
+ when(restTemplate.postForEntity(Mockito.anyString(), Mockito.eq(Mockito.any()), Object.class))
+ .thenReturn(new ResponseEntity<>(serverResponse, HttpStatus.OK));
+
+ // assertThat(service.sendSms("8987876473", "your otp is 4646"),
+ // is(dto));
+
+ }
+
+ @Test(expected = InvalidNumberException.class)
+ public void invalidContactNumberTest() {
+ service.sendSms("jsbchb", "hello your otp is 45373");
+ }
+
+ @Test(expected = InvalidNumberException.class)
+ public void contactNumberMinimumThresholdTest() {
+ service.sendSms("78978976", "hello your otp is 45373");
+ }
+
+ @Test(expected = InvalidNumberException.class)
+ public void contactNumberMaximumThresholdTest() {
+ service.sendSms("7897897458673484376", "hello your otp is 45373");
+ }
+
+ @Test
+ public void validGateWayTest() {
+ service.sendSms(phone, "hello your otp is 45373");
+ }
+
}
\ No newline at end of file
diff --git a/kernel/kernel-smsserviceprovider-msg91/src/test/resources/application.properties b/kernel/kernel-smsserviceprovider-msg91/src/test/resources/application.properties
index e1a06d081c..19f0378b32 100644
--- a/kernel/kernel-smsserviceprovider-msg91/src/test/resources/application.properties
+++ b/kernel/kernel-smsserviceprovider-msg91/src/test/resources/application.properties
@@ -18,3 +18,5 @@ auth.server.validate.url=https://dev.mosip.io/authmanager/v1.0/authorize/validat
logging.level.org.springframework=OFF
logging.level.root=OFF
spring.main.banner-mode=off
+mosip.id.validation.identity.phone=^[+]*([0-9]{1})([0-9]{9})$
+phone=1234567890
\ No newline at end of file
diff --git a/kernel/kernel-virusscanner-clamav/pom.xml b/kernel/kernel-virusscanner-clamav/pom.xml
index 6ae0369ce6..d11b8019b1 100644
--- a/kernel/kernel-virusscanner-clamav/pom.xml
+++ b/kernel/kernel-virusscanner-clamav/pom.xml
@@ -6,11 +6,11 @@
io.mosip.kernel
kernel-ref-parent
- 1.2.0.2
+ 1.2.0.3-SNAPSHOT
kernel-virusscanner-clamav
- 1.2.0.2
+ 1.2.0.3-SNAPSHOT
1.2.0.1
11
diff --git a/kernel/pom.xml b/kernel/pom.xml
index 38ae020ce5..ad56f506a6 100644
--- a/kernel/pom.xml
+++ b/kernel/pom.xml
@@ -5,7 +5,7 @@
4.0.0
io.mosip.kernel
kernel-ref-parent
- 1.2.0.2
+ 1.2.0.3-SNAPSHOT
pom
kernel
Parent project of MOSIP Kernel Referernce Implementation components
diff --git a/pre-registration-booking-service/pom.xml b/pre-registration-booking-service/pom.xml
index 67a71c729f..9c04b3fd1e 100644
--- a/pre-registration-booking-service/pom.xml
+++ b/pre-registration-booking-service/pom.xml
@@ -12,7 +12,7 @@
io.mosip.preregistration
pre-registration-booking-service
- 1.2.0.2
+ 1.2.0.3-SNAPSHOT
pre-registration-booking-service
Booking service of MOSIP Pre-registration
https://github.com/mosip/mosip-ref-impl
diff --git a/registration-processor/registration-processor-external-integration-service/pom.xml b/registration-processor/registration-processor-external-integration-service/pom.xml
index 79e266953e..aaf2e20f31 100644
--- a/registration-processor/registration-processor-external-integration-service/pom.xml
+++ b/registration-processor/registration-processor-external-integration-service/pom.xml
@@ -8,7 +8,11 @@
1.2.0.1
registration-processor-external-integration-service
- 1.2.0.2
+ registration-processor-external-integration-service
+ 1.2.0.3-SNAPSHOT
+ https://github.com/mosip/mosip-ref-impl
+ Registration Processor External Integration Service
+
MPL 2.0
diff --git a/registration-processor/registration-processor-external-stage/pom.xml b/registration-processor/registration-processor-external-stage/pom.xml
index 099757e6b5..40625a16e5 100644
--- a/registration-processor/registration-processor-external-stage/pom.xml
+++ b/registration-processor/registration-processor-external-stage/pom.xml
@@ -9,7 +9,11 @@
registration-processor-external-stage
- 1.2.0.2
+ registration-processor-external-stage
+ 1.2.0.3-SNAPSHOT
+ https://github.com/mosip/mosip-ref-impl
+ Registration Processor External Stage
+
MPL 2.0