Package io.mosip.mimoto.controller
Class CredentialShareController
- java.lang.Object
-
- io.mosip.mimoto.controller.CredentialShareController
-
@RestController @RequestMapping("/credentialshare") public class CredentialShareController extends Object
-
-
Field Summary
Fields Modifier and Type Field Description CryptoCoreUtilcryptoCoreUtilRestClientService<Object>restClientService
-
Constructor Summary
Constructors Constructor Description CredentialShareController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<CredentialDownloadResponseDTO>download(CredentialDownloadRequestDTO requestDTO)Download a received and decrypted VC.org.springframework.http.ResponseEntity<GenericResponseDTO>handleSubscribeEvent(EventModel eventModel)Websub callback for Verifiable Credential share.org.springframework.http.ResponseEntity<Object>request(AppCredentialRequestDTO requestDTO)Request to publish a VC: print, share or download.org.springframework.http.ResponseEntity<Object>requestStatus(String requestId)The VC request status.
-
-
-
Field Detail
-
restClientService
@Autowired public RestClientService<Object> restClientService
-
cryptoCoreUtil
@Autowired public CryptoCoreUtil cryptoCoreUtil
-
-
Method Detail
-
handleSubscribeEvent
@PostMapping(path="/callback/notify", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<GenericResponseDTO> handleSubscribeEvent(@RequestBody EventModel eventModel) throws ExceptionWebsub callback for Verifiable Credential share.- Parameters:
eventModel-- Returns:
- Throws:
Exception
-
request
@PostMapping(path="/request", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Object> request(@RequestBody AppCredentialRequestDTO requestDTO) throws ExceptionRequest to publish a VC: print, share or download.- Parameters:
requestDTO-- Returns:
- Throws:
Exception
-
requestStatus
@GetMapping(path="/request/status/{requestId}", produces="application/json") public org.springframework.http.ResponseEntity<Object> requestStatus(@PathVariable String requestId) throws ExceptionThe VC request status.- Parameters:
requestId-- Returns:
- Throws:
Exception
-
download
@PostMapping(path="/download", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<CredentialDownloadResponseDTO> download(@RequestBody CredentialDownloadRequestDTO requestDTO) throws ExceptionDownload a received and decrypted VC. Original VC data and decrypted identity will be combined in a single response to display on the frontend.- Parameters:
requestDTO-- Returns:
- Throws:
Exception
-
-