private PermissionTicket getPermissionTicket(UmaTokenStore umaTokenStore, JsonValue requestBody)
     throws BadRequestException, UmaException {
   try {
     return umaTokenStore.readPermissionTicket(getTicketId(requestBody));
   } catch (NotFoundException e) {
     throw new UmaException(
         400, UmaConstants.INVALID_TICKET_ERROR_CODE, UNABLE_TO_RETRIEVE_TICKET_MESSAGE);
   }
 }
 private Representation createJsonRpt(
     UmaTokenStore umaTokenStore,
     PermissionTicket permissionTicket,
     AccessToken authorisationApiToken)
     throws ServerException {
   RequestingPartyToken rpt = umaTokenStore.createRPT(authorisationApiToken, permissionTicket);
   Map<String, Object> response = new HashMap<String, Object>();
   response.put("rpt", rpt.getId());
   return new JacksonRepresentation<Map<String, Object>>(response);
 }