0 Replies Latest reply: Jul 26, 2017 6:30 AM by Sergey Biryuzov RSS

    Problems with authentication using webticket

    Sergey Biryuzov

      Hi all,

      I'm trying to make authentication using web tickets for users from another service. I have set up virtual proxy and sending queries by CURL.

       

      Step 1

      Send query to url - https://sitename/ticket/hub/ and got redirect 302 and response array with 2 params:

      Array (   [proxyRestUri] => https%3a%2f%2fsitename%3a4243%2fqps%2fticket%2f   [targetId] => da35fb7c-0a07-4087-bce3-33478999c4ca )

       

      Step 2

      Configure CURL to work with proxy by adding options:

      curl_setopt($curl, CURLOPT_PROXY, 'https://sitename:8185');
      

      Add HTTP POST Data and turn in JSON format before sending:

      $ticketAuth = array(
         'UserDirectory' => 'testDirectory',
         'UserId' => 'testUserID',
         'TargetId' => 'targetId'],
      
      
      );
      

      Add Headers to query

      curl_setopt($curl, CURLOPT_HTTPHEADER, array('X-qlik-xrfkey:aaaaaaaaaaaaaaaa', 'Content-Type: application/json'));
      

      Send query to the proxyRestUri - https://sitename:4243/qps/ticket//ticket?xrfkey=aaaaaaaaaaaaaaaa

       

      And after executing query, I receive

      Response code - 0 Error - Failed to connect to sitename port 8185: Operation timed out