Skip to content

Commit

Permalink
[ES-1580] Updated the call to idvid from get to post
Browse files Browse the repository at this point in the history
Signed-off-by: Venkata Saidurga Polamraju <[email protected]>
  • Loading branch information
pvsaidurga committed Aug 28, 2024
1 parent e450377 commit 37d1519
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 37d1519

Please sign in to comment.