Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code merge from develop to Release 1.2.0.1 #1099

Merged
merged 50 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
6c978f4
MOSIP-26891 added condition in caching (#1045)
Neha2365 Jul 3, 2023
cfb3eeb
Mosip 26891 caches in ida module should avoid caching null values (#1…
Neha2365 Jul 3, 2023
e08ecb2
Mosip 26891 caches in ida module should avoid caching null values (#1…
Neha2365 Jul 3, 2023
2eeb04d
Mosip 26891 caches in ida module should avoid caching null values (#1…
Neha2365 Jul 3, 2023
2663a46
Mosip 26891 caches in ida module should avoid caching null values (#1…
Neha2365 Jul 3, 2023
385dd45
[BUGFIX] [ES-176]
jainhitesh9998 Jul 19, 2023
0d8d7cc
Merge pull request #1054 from jainhitesh9998/bugfix-ES-176
vishwa-vyom Jul 19, 2023
82fee8f
iat validation corrected
anshulv1401 Jul 19, 2023
ede9bfc
Merge pull request #1055 from anshulv1401/develop
mahammedtaheer Jul 20, 2023
2f555fa
[MOSIP-28622] fixed firstname, lastname not populating in e-signet is…
mahammedtaheer Jul 27, 2023
a450107
Merge pull request #1056 from mahammedtaheer/develop
mahammedtaheer Jul 27, 2023
94794fb
[MOSIP-28484] Added error handling for deploy.sh script (#1061)
akilalakshmanan Aug 21, 2023
208b9c0
Implemented the VCI plugin in IDA
Aug 29, 2023
de7b9b5
Format the code
Aug 29, 2023
3fce833
Changes done
Aug 30, 2023
395eff4
Changes done
Aug 30, 2023
bed3ab2
Changes done
Aug 30, 2023
b14a44f
Decrypted the individualId
Aug 31, 2023
611400a
[ES-186] Added new Vci Exchange API to add support for VCI.
mahammedtaheer Sep 1, 2023
b3b29fb
Merge pull request #1074 from mahammedtaheer/develop
mahammedtaheer Sep 1, 2023
dcb7f68
Added new repo for LD signature library. (#1075)
mahammedtaheer Sep 5, 2023
b6ee915
updated push trigger to include settings.xml for sonar analysis and f…
mahammedtaheer Sep 5, 2023
773bdd5
Merge pull request #1076 from mahammedtaheer/develop
mahammedtaheer Sep 5, 2023
c6ad7df
removed show progress argument for wget command to display download p…
mahammedtaheer Sep 5, 2023
04122c6
Merge pull request #1077 from mahammedtaheer/develop
mahammedtaheer Sep 5, 2023
fd5f3be
Merge pull request #1073 from Neha2365/ES-187-mosip-ida-vc-provider-p…
mahammedtaheer Sep 5, 2023
d23f4a4
ES-107
Sep 5, 2023
4ce7470
Merge pull request #1078 from ase-101/binding
mahammedtaheer Sep 5, 2023
29f0e07
Fixed the cache read issue
Sep 5, 2023
8364700
Merge pull request #1080 from ase-101/binding
mahammedtaheer Sep 5, 2023
3440616
ES-187
Sep 6, 2023
1a72a3f
Merge pull request #1081 from ase-101/binding
mahammedtaheer Sep 6, 2023
726b86e
ES-187
Sep 6, 2023
3369075
Merge pull request #1082 from ase-101/binding
mahammedtaheer Sep 6, 2023
20b8efc
[ES-186] Fixed integration issues.
mahammedtaheer Sep 6, 2023
d5f908e
Merge pull request #1083 from mahammedtaheer/develop
mahammedtaheer Sep 6, 2023
975616d
ES-187
Sep 6, 2023
1fbdf68
Merge pull request #1084 from ase-101/binding
mahammedtaheer Sep 6, 2023
e2f67cf
[ES-186] changed the VC ID to UUID instead of PSUT and added locales.
mahammedtaheer Sep 8, 2023
6640467
Merge pull request #1085 from mahammedtaheer/develop
mahammedtaheer Sep 8, 2023
75abafc
[MOSIP-29163] updated reusable workflows (#1088)
bhumi46 Sep 8, 2023
02d0c0b
merge from release-1.2.0.1 to develop (#1089)
mahammedtaheer Sep 11, 2023
e7b2053
ES-187 (#1092)
ase-101 Sep 14, 2023
181e784
[ES-280], [ES-281] (#1094)
mahammedtaheer Sep 15, 2023
384b193
Fixed test cases error. (#1095)
mahammedtaheer Sep 15, 2023
c60fa2b
Fixed Test cases error. (#1096)
mahammedtaheer Sep 15, 2023
8046ca9
Fixed test case error. (#1097)
mahammedtaheer Sep 15, 2023
fa35a3c
Fixed Test cases error. (#1098)
mahammedtaheer Sep 15, 2023
c116d39
Merge branch 'develop_local' into release-1.2.0.1
Sep 20, 2023
12074a5
removed openid-bridge dependency
Sep 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.util.AbstractMap.SimpleEntry;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.Map.Entry;
import java.util.AbstractMap.SimpleEntry;

import javax.crypto.SecretKey;
import javax.security.auth.x500.X500Principal;
Expand Down Expand Up @@ -193,7 +193,7 @@ public class IdAuthSecurityManager {

@Autowired
private IdTypeUtil idTypeUtil;

/**
* Gets the user.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import java.util.Map;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
Expand All @@ -25,8 +26,6 @@
import org.springframework.test.util.ReflectionTestUtils;
import org.springframework.web.context.WebApplicationContext;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;

import io.mosip.authentication.common.service.entity.AutnTxn;
Expand Down Expand Up @@ -71,6 +70,7 @@ public class AuthAnonymousProfileServiceImplTest {
Map<String, Object> requestMetadata = null;
Map<String, Object> responseMetadata = null;
Map<String,List<IdentityInfoDTO>> idInfoMap = null;
List<AuthError> errorCodes = null;

@Before
public void before() {
Expand All @@ -79,6 +79,7 @@ public void before() {
requestMetadata = new HashMap<>();
responseMetadata = new HashMap<>();
idInfoMap = new HashMap<String, List<IdentityInfoDTO>>();
errorCodes = new ArrayList<>();

ReflectionTestUtils.setField(anonymousProfileServiceImpl, "mapper", mapper);
ReflectionTestUtils.setField(idInfoHelper, "idInfoFetcher", idInfoFetcherImpl);
Expand All @@ -87,28 +88,38 @@ public void before() {
ReflectionTestUtils.setField(anonymousProfileServiceImpl, "dateOfBirthPattern", "yyyy/MM/dd");
}

@Ignore
@Test
public void createAnonymousProfileWith_YourOfBirthTest() throws IdAuthenticationBusinessException {
requestBody = new HashMap<>();
requestMetadata = new HashMap<>();
errorCodes = new ArrayList<>();
List<IdentityInfoDTO> dobList = new ArrayList<IdentityInfoDTO>();
IdentityInfoDTO dob = new IdentityInfoDTO();
dob.setLanguage("Eng");
dob.setValue("1993/04/11");
dobList.add(dob);
idInfoMap.put("dateOfBirth", dobList);
responseMetadata.put("IDENTITY_INFO", idInfoMap );


Map<String, Object> authResponse = new HashMap<>();
authResponse.put("authStatus", "true");
authResponse.put("authToken", "1234567890");
responseBody.put("response", authResponse);

Mockito.when(idInfoHelper.getEntityInfoAsString(DemoMatchType.DOB, idInfoMap)).thenReturn("1993/04/11");
AnonymousAuthenticationProfile anonymousProfile = ReflectionTestUtils.invokeMethod(anonymousProfileServiceImpl, "createAnonymousProfile",requestBody, requestMetadata, responseMetadata, true, null);
AnonymousAuthenticationProfile anonymousProfile = ReflectionTestUtils.invokeMethod(anonymousProfileServiceImpl, "createAnonymousProfile",
requestBody, requestMetadata, responseMetadata, true, errorCodes);
assertEquals(anonymousProfile.getYearOfBirth(), "1993");
}

@Ignore
@Test
public void createAnonymousProfileWith_PreferredLangTest() throws IdAuthenticationBusinessException {
requestBody = new HashMap<>();
requestMetadata = new HashMap<>();
errorCodes = new ArrayList<>();
List<IdentityInfoDTO> preferedLangList = new ArrayList<IdentityInfoDTO>();
IdentityInfoDTO lang = new IdentityInfoDTO();
lang.setLanguage("eng");
Expand All @@ -123,12 +134,16 @@ public void createAnonymousProfileWith_PreferredLangTest() throws IdAuthenticati
responseBody.put("response", authResponse);

Mockito.when(idInfoHelper.getDynamicEntityInfoAsString(idInfoMap, null, "preferredLanguage")).thenReturn("eng");
AnonymousAuthenticationProfile anonymousProfile = ReflectionTestUtils.invokeMethod(anonymousProfileServiceImpl, "createAnonymousProfile",requestBody, requestMetadata, responseMetadata, true, null);
AnonymousAuthenticationProfile anonymousProfile = ReflectionTestUtils.invokeMethod(anonymousProfileServiceImpl, "createAnonymousProfile",requestBody, requestMetadata, responseMetadata, true, errorCodes);
assertEquals(List.of("eng"), anonymousProfile.getPreferredLanguages());
}

@Ignore
@Test
public void createAnonymousProfileWith_GenderTest() throws IdAuthenticationBusinessException {
requestBody = new HashMap<>();
requestMetadata = new HashMap<>();
errorCodes = new ArrayList<>();
List<IdentityInfoDTO> genderList = new ArrayList<IdentityInfoDTO>();
IdentityInfoDTO gender = new IdentityInfoDTO();
gender.setLanguage("eng");
Expand All @@ -143,12 +158,16 @@ public void createAnonymousProfileWith_GenderTest() throws IdAuthenticationBusin
responseBody.put("response", authResponse);

Mockito.when(idInfoHelper.getEntityInfoAsString(DemoMatchType.GENDER, "eng", idInfoMap)).thenReturn("Female");
AnonymousAuthenticationProfile anonymousProfile = ReflectionTestUtils.invokeMethod(anonymousProfileServiceImpl, "createAnonymousProfile",requestBody,requestMetadata, responseMetadata, true, null);
AnonymousAuthenticationProfile anonymousProfile = ReflectionTestUtils.invokeMethod(anonymousProfileServiceImpl, "createAnonymousProfile",requestBody,requestMetadata, responseMetadata, true, errorCodes);
assertEquals("Female", anonymousProfile.getGender());
}

@Ignore
@Test
public void createAnonymousProfileWith_LocationTest() throws IdAuthenticationBusinessException {
requestBody = new HashMap<>();
requestMetadata = new HashMap<>();
errorCodes = new ArrayList<>();
List<IdentityInfoDTO> preferedLangList = new ArrayList<IdentityInfoDTO>();
IdentityInfoDTO lang = new IdentityInfoDTO();
lang.setLanguage(null);
Expand All @@ -168,12 +187,16 @@ public void createAnonymousProfileWith_LocationTest() throws IdAuthenticationBus
responseBody.put("response", authResponse);

Mockito.when(idInfoHelper.getIdEntityInfoMap(DemoMatchType.DYNAMIC, idInfoMap, "eng", "locationHierarchyForProfiling")).thenReturn(locationMap);
AnonymousAuthenticationProfile anonymousProfile = ReflectionTestUtils.invokeMethod(anonymousProfileServiceImpl, "createAnonymousProfile",requestBody, requestMetadata, responseMetadata, true, null);
AnonymousAuthenticationProfile anonymousProfile = ReflectionTestUtils.invokeMethod(anonymousProfileServiceImpl, "createAnonymousProfile",requestBody, requestMetadata, responseMetadata, true, errorCodes);
assertEquals(List.of("zone1", "123456"), anonymousProfile.getLocation());
}

@Ignore
@Test
public void createAnonymousProfileWith_BiometricInfoTest() throws IdAuthenticationBusinessException, IOException {
requestBody = new HashMap<>();
requestMetadata = new HashMap<>();
errorCodes = new ArrayList<>();
List<IdentityInfoDTO> preferedLangList = new ArrayList<IdentityInfoDTO>();
IdentityInfoDTO lang = new IdentityInfoDTO();
lang.setLanguage("eng");
Expand Down Expand Up @@ -202,7 +225,7 @@ public void createAnonymousProfileWith_BiometricInfoTest() throws IdAuthenticati
authResponse.put("authStatus", "true");
authResponse.put("authToken", "1234567890");
responseBody.put("response", authResponse);
AnonymousAuthenticationProfile anonymousProfile = ReflectionTestUtils.invokeMethod(anonymousProfileServiceImpl, "createAnonymousProfile",requestBody, requestMetadata, responseMetadata, true, null);
AnonymousAuthenticationProfile anonymousProfile = ReflectionTestUtils.invokeMethod(anonymousProfileServiceImpl, "createAnonymousProfile",requestBody, requestMetadata, responseMetadata, true, errorCodes);
assertEquals(1, anonymousProfile.getBiometricInfo().size());
assertEquals("Iris", anonymousProfile.getBiometricInfo().get(0).getType());
assertEquals("LEFT", anonymousProfile.getBiometricInfo().get(0).getSubtype());
Expand All @@ -212,6 +235,9 @@ public void createAnonymousProfileWith_BiometricInfoTest() throws IdAuthenticati

@Test
public void createAnonymousProfileWith_AuthFactorsTest() throws IdAuthenticationBusinessException {
requestBody = new HashMap<>();
requestMetadata = new HashMap<>();
errorCodes = new ArrayList<>();
AutnTxn authTxn = new AutnTxn();
authTxn.setAuthTypeCode("OTP-REQUEST,DEMO-AUTH,BIO-AUTH");
responseMetadata.put("AutnTxn",authTxn);
Expand All @@ -221,26 +247,32 @@ public void createAnonymousProfileWith_AuthFactorsTest() throws IdAuthentication
authResponse.put("authToken", "1234567890");
responseBody.put("response", authResponse);

AnonymousAuthenticationProfile anonymousProfile = ReflectionTestUtils.invokeMethod(anonymousProfileServiceImpl, "createAnonymousProfile",requestBody, requestMetadata, responseMetadata, true, null);
AnonymousAuthenticationProfile anonymousProfile = ReflectionTestUtils.invokeMethod(anonymousProfileServiceImpl, "createAnonymousProfile",requestBody, requestMetadata, responseMetadata, true, errorCodes);
assertEquals(3, anonymousProfile.getAuthFactors().size());
assertEquals(List.of("OTP-REQUEST","DEMO-AUTH","BIO-AUTH"), anonymousProfile.getAuthFactors());

}

@Test
public void createAnonymousProfileWith_PartnerTest() throws IdAuthenticationBusinessException {
requestBody = new HashMap<>();
requestMetadata = new HashMap<>();
errorCodes = new ArrayList<>();
PartnerDTO partner = new PartnerDTO();
partner.setPartnerName("SyncByte");
partner.setPartnerId("abc");
requestMetadata.put("partnerId", "abc");
requestMetadata.put("abc", partner);
AnonymousAuthenticationProfile anonymousProfile = ReflectionTestUtils.invokeMethod(anonymousProfileServiceImpl, "createAnonymousProfile",requestBody, requestMetadata, responseMetadata, true, null);
AnonymousAuthenticationProfile anonymousProfile = ReflectionTestUtils.invokeMethod(anonymousProfileServiceImpl, "createAnonymousProfile",requestBody, requestMetadata, responseMetadata, true, errorCodes);
assertEquals(partner.getPartnerName(), anonymousProfile.getPartnerName());
}


@Test
public void createAnonymousProfileExceptionTest() throws IdAuthenticationBusinessException {
requestBody = new HashMap<>();
requestMetadata = new HashMap<>();
errorCodes = new ArrayList<>();
Map<String, Object> authResponse = new HashMap<>();
authResponse.put("authStatus", "false");
authResponse.put("authToken", "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,8 @@ public final class IdAuthCommonConstants {

public static final String VCI_EXCHANGE_SUCCESS = "VciExchange status : true";

public static final String VC_CREDENTIAL_DEF = "credentialsDefinition";

private IdAuthCommonConstants() {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
MasterDataUpdateEventInitializer.class, IdAuthFraudAnalysisEventManager.class, IdAuthFraudAnalysisEventPublisher.class,
LangComparatorConfig.class, OpenApiProperties.class, SessionKeyDecrytorHelper.class, ExternalRestHelperConfig.class, IdaRequestResponsConsumerUtil.class,
PartnerCACertEventServiceImpl.class, PartnerCACertEventInitializer.class,
IdAuthWebSubInitializer.class, AuthAnonymousEventPublisher.class, EnvUtil.class, KeyBindedTokenMatcherUtil.class,
HSMHealthCheck.class, PrivateKeyDecryptorHelper.class })
IdAuthWebSubInitializer.class, AuthAnonymousEventPublisher.class, EnvUtil.class, KeyBindedTokenMatcherUtil.class,
HSMHealthCheck.class, PrivateKeyDecryptorHelper.class })
@ComponentScan(basePackages = { "io.mosip.authentication.otp.service.*",
"io.mosip.kernel.core.logger.config", "${mosip.auth.adapter.impl.basepackage}" }, excludeFilters = @ComponentScan.Filter(type = FilterType.REGEX, pattern = {
"io.mosip.idrepository.core.config.IdRepoDataSourceConfig.*" }))
Expand All @@ -124,4 +124,5 @@ public class OtpApplication {
public static void main(String[] args) {
SpringApplication.run(OtpApplication.class, args);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public IdentityKeyBindingResponseDto processIdKeyBinding(@Validated @RequestBody
metadata != null &&
metadata.get(IdAuthCommonConstants.IDENTITY_DATA) != null &&
metadata.get(IdAuthCommonConstants.IDENTITY_INFO) != null) {
keyBindingResponseDto = keyIdentityFacade.processIdentityKeyBinding(identityKeyBindingRequestDTO, authResponseDTO,
keyBindingResponseDto = keyIdentityFacade.processIdentityKeyBinding(identityKeyBindingRequestDTO, authResponseDTO,
partnerId, oidcClientId, metadata);
}
return keyBindingResponseDto;
Expand Down Expand Up @@ -177,4 +177,4 @@ public IdentityKeyBindingResponseDto processIdKeyBinding(@Validated @RequestBody
throw new IdAuthenticationBusinessException(IdAuthenticationErrorConstants.UNABLE_TO_PROCESS);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/
package io.mosip.authentication.service.kyc.facade;

import java.time.LocalDateTime;
import java.util.AbstractMap.SimpleEntry;
import java.util.Collection;
import java.util.HashSet;
Expand All @@ -27,14 +26,11 @@
import io.mosip.authentication.common.service.builder.AuthTransactionBuilder;
import io.mosip.authentication.common.service.entity.AutnTxn;
import io.mosip.authentication.common.service.entity.KycTokenData;
import io.mosip.authentication.common.service.entity.OIDCClientData;
import io.mosip.authentication.common.service.helper.AuditHelper;
import io.mosip.authentication.common.service.helper.IdInfoHelper;
import io.mosip.authentication.common.service.helper.TokenValidationHelper;
import io.mosip.authentication.common.service.integration.TokenIdManager;
import io.mosip.authentication.common.service.repository.IdaUinHashSaltRepo;
import io.mosip.authentication.common.service.repository.KycTokenDataRepository;
import io.mosip.authentication.common.service.repository.OIDCClientDataRepository;
import io.mosip.authentication.common.service.transaction.manager.IdAuthSecurityManager;
import io.mosip.authentication.common.service.util.EnvUtil;
import io.mosip.authentication.common.service.util.IdaRequestResponsConsumerUtil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ public class VciServiceImpl implements VciService {
OBJECT_MAPPER.registerModule(new AfterburnerModule());
}

@Value("${ida.idp.consented.individual_id.attribute.name:individual_id}")
private String consentedIndividualAttributeName;

@Value("${mosip.ida.config.server.file.storage.uri:}")
private String configServerFileStorageUrl;

Expand Down Expand Up @@ -294,7 +297,7 @@ private JsonLDObject generateLdpVc(String credSubjectId, Map<String, List<Identi
List<String> locales, Set<String> allowedAttributes, VciExchangeRequestDTO vciExchangeRequestDTO,
String psuToken) throws IdAuthenticationBusinessException {

Map<String, Object> credSubjectMap = getCredSubjectMap(credSubjectId, idInfo, locales, allowedAttributes);
Map<String, Object> credSubjectMap = getCredSubjectMap(credSubjectId, idInfo, locales, allowedAttributes, vciExchangeRequestDTO);
try {
Map<String, Object> verCredJsonObject = new HashMap<>();

Expand Down Expand Up @@ -361,13 +364,18 @@ private JsonLDObject generateLdpVc(String credSubjectId, Map<String, List<Identi
}

private Map<String, Object> getCredSubjectMap(String credSubjectId, Map<String, List<IdentityInfoDTO>> idInfo,
List<String> locales, Set<String> allowedAttributes) throws IdAuthenticationBusinessException {
List<String> locales, Set<String> allowedAttributes, VciExchangeRequestDTO vciExchangeRequestDTO)
throws IdAuthenticationBusinessException {
Map<String, Object> credSubjectMap = new HashMap<>();

credSubjectMap.put(IdAuthCommonConstants.VC_ID, credSubjectId);

for (String attrib : allowedAttributes) {
List<String> idSchemaAttributes = idInfoHelper.getIdentityAttributesForIdName(attrib);
if (consentedIndividualAttributeName.equals(attrib)) {
credSubjectMap.put(vciExchangeRequestDTO.getIndividualIdType(), vciExchangeRequestDTO.getIndividualId());
continue;
}

if (attrib.equalsIgnoreCase(BiometricType.FACE.value())) {
Map<String, String> faceEntityInfoMap = idInfoHelper.getIdEntityInfoMap(BioMatchType.FACE, idInfo, null);
if (Objects.nonNull(faceEntityInfoMap)) {
Expand All @@ -382,7 +390,9 @@ private Map<String, Object> getCredSubjectMap(String credSubjectId, Map<String,
}

}
continue;
}
List<String> idSchemaAttributes = idInfoHelper.getIdentityAttributesForIdName(attrib);
for (String idSchemaAttribute : idSchemaAttributes) {
List<IdentityInfoDTO> idInfoList = idInfo.get(idSchemaAttribute);
if (Objects.isNull(idInfoList))
Expand Down Expand Up @@ -440,4 +450,4 @@ private String convertJP2ToJpeg(String jp2Image) {
}
return null;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void validate(Object target, Errors errors) {
}

if (!errors.hasErrors()) {
validateCredentialType(vciExchangeRequestDTO.getCredentialsDefinition().getType(), errors, IdAuthCommonConstants.VC_CREDENTIAL_TYPE);
validateCredentialType(vciExchangeRequestDTO.getCredentialsDefinition().getType(), errors, IdAuthCommonConstants.VC_CREDENTIAL_DEF);
}

} else {
Expand Down Expand Up @@ -150,16 +150,16 @@ private void validateVCFormat(String vcFormat, Errors errors, String paramName)
private void validateCredentialType(List<String> credentialType, Errors errors, String paramName) {
if (credentialType == null || credentialType.isEmpty()) {
mosipLogger.error(SESSION_ID, this.getClass().getSimpleName(), VALIDATE,
MISSING_INPUT_PARAMETER + paramName);
MISSING_INPUT_PARAMETER + paramName + "/type" );
errors.rejectValue(paramName, IdAuthenticationErrorConstants.MISSING_INPUT_PARAMETER.getErrorCode(),
new Object[] { paramName },
new Object[] { paramName + "/type" },
IdAuthenticationErrorConstants.MISSING_INPUT_PARAMETER.getErrorMessage());
} else {
if(!supportedCredTypes.containsAll(credentialType)) {
mosipLogger.error(SESSION_ID, this.getClass().getSimpleName(), VALIDATE,
MISSING_INPUT_PARAMETER + paramName);
MISSING_INPUT_PARAMETER + paramName + "/type" );
errors.rejectValue(paramName, IdAuthenticationErrorConstants.INVALID_INPUT_PARAMETER.getErrorCode(),
new Object[] { paramName },
new Object[] { paramName + "/type" },
IdAuthenticationErrorConstants.INVALID_INPUT_PARAMETER.getErrorMessage());
}
}
Expand Down
Loading