@@ -1817,58 +1817,6 @@ private String sendDiceInvitation(UserDiceAttributes diceAttributes)
18171817 return diceInvitation .getJobId ();
18181818 }
18191819
1820- @ POST
1821- @ Path ("/dice-callback" )
1822- @ Timed
1823- public ApiResponse diceCallback (@ Context HttpServletRequest request ,
1824- @ Context HttpServletResponse response )
1825- // public ApiResponse diceCallback(@Valid PostPutRequest<DiceCallbackRequest> postRequest,
1826- // @Context HttpServletRequest request)
1827- {
1828- logger .info (String .format ("Dice callback: %s" , request ));
1829- // if (!diceAuth.isValidAPIKey(request)) {
1830- // throw new APIRuntimeException(SC_FORBIDDEN, "Forbidden");
1831- // }
1832-
1833- // if (postRequest == null) {
1834- // return ApiResponseFactory.createResponse(
1835- // createValidationResult(true, "Connection success"));
1836- // }
1837-
1838- // DiceCallbackRequest status = postRequest.getParam();
1839- // if (status.getType() == null) {
1840- // logger.info(String.format("Dice status missing type: %s %s", postRequest, request));
1841- // throw new APIRuntimeException(SC_BAD_REQUEST, String.format(MSG_TEMPLATE_MANDATORY, "type"));
1842- // }
1843- // if (status.getAction() == null || status.getAction().isEmpty()) {
1844- // logger.info(String.format("Dice status missing action: %s %s", postRequest, request));
1845- // throw new APIRuntimeException(SC_BAD_REQUEST, String.format(MSG_TEMPLATE_MANDATORY, "action"));
1846- // }
1847- // logger.info(status);
1848- // switch (status.getEvent()) {
1849- // case "connection-invitation":
1850- // handleConnectionCreatedEvent(status.getConnectionId(), status.getEmailId(), status.getShortUrl());
1851- // break;
1852- // case "connection-response":
1853- // handleConnectionAcceptedEvent(status.getConnectionId());
1854- // break;
1855- // case "credential-issuance":
1856- // handleCredentialIssuanceEvent(status.getConnectionId());
1857- // break;
1858- // case "connection-declined":
1859- // handleConnectionDeclinedEvent(status.getConnectionId());
1860- // break;
1861- // case "credential-declined":
1862- // handleCredentialDeclinedEvent(status.getConnectionId());
1863- // break;
1864- // default:
1865- // throw new APIRuntimeException(SC_BAD_REQUEST,
1866- // String.format("%s is not valid event", status.getEvent()));
1867- // }
1868-
1869- return ApiResponseFactory .createResponse ("SUCCESS" );
1870- }
1871-
18721820 @ POST
18731821 @ Path ("/dice-status" )
18741822 @ Timed
0 commit comments