Skip to content

Commit

Permalink
Merge pull request mosip#25 from Infosys/develop
Browse files Browse the repository at this point in the history
[ES-1580] Updated the call to idvid from get to post
  • Loading branch information
ase-101 authored Aug 29, 2024
2 parents e450377 + 37d1519 commit 47e2df7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package io.mosip.signup.plugin.mosipid.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class IdRequestByIdDTO {
private String id;
private String type;
private String idType;
private String fingerExtractionFormat;
private String irisExtractionFormat;
private String faceExtractionFormat;
}
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,14 @@ public ProfileCreateUpdateStatus getProfileCreateUpdateStatus(String requestId)
@Override
public ProfileDto getProfile(String individualId) throws ProfileException {
try {
String endpoint = String.format(getIdentityEndpoint, individualId);
ResponseWrapper<IdentityResponse> responseWrapper = request(endpoint, HttpMethod.GET, null,
IdRequestByIdDTO requestByIdDTO = new IdRequestByIdDTO();
RequestWrapper<IdRequestByIdDTO> idDTORequestWrapper=new RequestWrapper<>();
requestByIdDTO.setId(individualId);
requestByIdDTO.setType("demo");
requestByIdDTO.setIdType("HANDLE");
idDTORequestWrapper.setRequest(requestByIdDTO);
idDTORequestWrapper.setRequesttime(getUTCDateTime());
ResponseWrapper<IdentityResponse> responseWrapper = request(getIdentityEndpoint, HttpMethod.POST, idDTORequestWrapper,
new ParameterizedTypeReference<ResponseWrapper<IdentityResponse>>() {});
ProfileDto profileDto = new ProfileDto();
profileDto.setIndividualId(responseWrapper.getResponse().getIdentity().get(UIN).textValue());
Expand Down

0 comments on commit 47e2df7

Please sign in to comment.