Skip to content

Commit

Permalink
Merge pull request #3 from Manishch22/develop
Browse files Browse the repository at this point in the history
Updated code for event DTO
  • Loading branch information
sjkarthik authored Jan 9, 2024
2 parents 7adf26d + 97bde3c commit abb363d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public SimpleMessageResponse unsubscribe() {

@PostMapping(value = "/receiveCredentialBirth", consumes = MediaType.APPLICATION_JSON_VALUE)
public SimpleMessageResponse postReceiveUinOnBirth(@RequestBody WebsubRequest body) {
LOGGER.debug(LoggingConstants.SESSION, LoggingConstants.ID, "postReceiveUinOnBirth", "Here is the request received - " + body);
LOGGER.info(LoggingConstants.SESSION, LoggingConstants.ID, "postReceiveUinOnBirth", "Here is the request received - " + body);
receiveCredentialService.tokenizeReceivedCredential(body);
return SimpleMessageResponse.setResponseMessage("Received");
}
Expand Down
21 changes: 20 additions & 1 deletion mediator/src/main/java/io/mosip/opencrvs/dto/WebsubRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,30 @@ public class WebsubRequest {
public static class Event{
@JsonIgnoreProperties(ignoreUnknown = true)
public static class Data{
@JsonIgnoreProperties(ignoreUnknown = true)
public static class Proof{
public String signature;
}
public String opencrvsBRN;
public String credential;
public String credentialType;
public String protectionKey;
public Proof proof;
}
@JsonIgnoreProperties(ignoreUnknown = true)
public static class Type{
public String namespace;
public String name;
}
public String id;
public String transactionId;
public Type type;
public String timestamp;
public String dataShareUri;
public Data data;
public String transactionId;
}
public String publisher;
public String topic;
public String publishedOn;
public Event event;
}

0 comments on commit abb363d

Please sign in to comment.