1 Reply Latest reply on Nov 20, 2018 5:22 PM by Patrick A Van Der Hyde

    Web Data Connector Authentication

    Anand V

      I'm using Web Data Connector to get data to Tableau Desktop, which is working with simulator but not with actual application. It seems from the log, cookies created during the authentication phase of of Web Data Connector are missing in the headless browser session of the application. I'm using these cookies for user authentication.

       

      Here is the basic flow,

      1. User enter Web Data Connector url
      2. Check user authenticated
        1. If authenticated goto step 3
        2. Else redirect to authentication page and establish cookies goto step 2
      3. Get user data

       

      Here is simplified WDC code,

      (function() {

           var connector = tableau.makeConnector();

           connector.init = function(initCallback) {

                initCallback();

                if(tableau.phase === tableau.phaseEnum.interactivePhase) {

                     tableau.submit();

                }

           };

       

           connector.getSchema = function(schemaCallback) {

                // var tableSchema = GET_SCHEMA_HERE

                schemaCallback([tableSchema]);

           };

       

           connector.getData = function(table, doneCallback) {

                // var rows = GET_ROWS_HERE

                table.appendRows(rows);

                doneCallback();

           };

           tableau.registerConnector(connector);

      })();

       

      How to make cookies available in the headless mode?

       

      I'm also open to alternative ways of doing user authentication(with the constraint that user will be authenticating only with his username and password).