Skip to content

Commit

Permalink
Merge pull request #4 from Manishch22/develop
Browse files Browse the repository at this point in the history
Updated callback API for websub
  • Loading branch information
sjkarthik authored Jan 10, 2024
2 parents abb363d + 4868d3e commit c74b7ab
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import io.mosip.kernel.core.exception.BaseCheckedException;
import io.mosip.kernel.core.logger.spi.Logger;
import io.mosip.kernel.websub.api.annotation.PreAuthenticateContentAndVerifyIntent;
import io.mosip.opencrvs.constant.LoggingConstants;
import io.mosip.opencrvs.dto.SimpleMessageResponse;
import io.mosip.opencrvs.dto.WebsubRequest;
Expand Down Expand Up @@ -29,7 +30,10 @@ public SimpleMessageResponse unsubscribe() {
return SimpleMessageResponse.setResponseMessage("unable to unsubscribe");
}

@PostMapping(value = "/receiveCredentialBirth", consumes = MediaType.APPLICATION_JSON_VALUE)
//@PostMapping(value = "/receiveCredentialBirth", consumes = MediaType.APPLICATION_JSON_VALUE)
//@PreAuthenticateContentAndVerifyIntent(secret = "abc@123",callback = "" ,topic = "")
@PostMapping(path = "/receiveCredentialBirth", consumes = MediaType.APPLICATION_JSON_VALUE)
@PreAuthenticateContentAndVerifyIntent(secret = "${mosip.opencrvs.partner.client.sha.secret}", callback = "/opencrvs/v1/internal/receiveCredentialBirth", topic = "${mosip.opencrvs.partner.client.id}/CREDENTIAL_ISSUED")
public SimpleMessageResponse postReceiveUinOnBirth(@RequestBody WebsubRequest body) {
LOGGER.info(LoggingConstants.SESSION, LoggingConstants.ID, "postReceiveUinOnBirth", "Here is the request received - " + body);
receiveCredentialService.tokenizeReceivedCredential(body);
Expand Down

0 comments on commit c74b7ab

Please sign in to comment.