code: @Path("/cookies")
      @GET
      public Response getCookies(@QueryParam("token") String token) {
          try {
              StringDataStore dataStore = this.stringDataStoreFactory.create(Constants.HIDDEN_COOKIE_SPACE);
              String cookiesData = dataStore.retrieveData(token);
  
              if (null == cookiesData) {
                  return responseNotFound("Token not found");
              }
  
              SignedCookieData cookieData = SignedCookieData.deserialize(cookiesData);
              String streamingHost = cookieData.getStreamingHost();
  
              // Build set of cookies
              Map<String, String> cookies = cookieData.getSignedCookies();
              ArrayList<NewCookie> responseCookies = new ArrayList<>();
              for (String cookieKey : cookies.keySet()) {
                  responseCookies.add(new NewCookie(cookieKey,
                                                    cookies.get(cookieKey),
                                                    "/",
                                                    streamingHost,
                                                    "Supports HLS",
                                                    -1,
                                                    true));
              }
  
              // Build redirect HTML
              String redirectUrl = cookieData.getRedirectUrl();
              String html = "<html><head><meta http-equiv='refresh' content='0;URL=\"" +
                            redirectUrl + "\"' /></head></html>";
  
              return Response.ok(html, MediaType.TEXT_HTML_TYPE)
                             .cookie(responseCookies.toArray(new NewCookie[responseCookies.size()])).build();
          } catch (Exception e) {
              return responseBad(e);
          }
      }
docs: Adds new cookies to the response headers based on the provided token.  The response body
  contains an HTML based redirect pointing to the redirect URL passed to the /durastore/task/get-signed-cookies
  (GetHlsSingedCookiesUrlTaskRunner) endpoint.
  
  @return 200 response with XML file listing stores