Coder Social home page Coder Social logo

es6-qlik-sense-auth's Introduction

Qlik-Sense-Auth

An example of using NodeJs backend integrated with Qlik Sense.

Prerequisites:

  • Node.js
  • Qlik Sense Server

Configuration:

  • Node.js

    1. Open cmd;
    2. Access the project's qliksense-nodejs-example directory;
    3. Install package by running "npm install" in that directory;
      • This solution uses the qlik-auth package, which is configured as a project dependency;
    4. Open the index.html file and update the hostname and port in the script tags on line 6 to point to your qlik server;
    5. Open script.js and configure the appId and objectId variables to access your development environment;
  • Qlik Sense Server

    1. Open QMC (Qlik Management Console) and navigate to the CONFIGURE SYSTEM> Virtual proxies area;
    2. Create a new virtual proxy with a prefix of your choice (you will need this prefix when configuring Node.js)
    3. When editing a virtual proxy, in Properties> Authentication, fill in the "Authentication module redirect URI" with http: // node_server: 3000 / authenticate
      • Port 3000 is configured in server.js and can be changed as desired
    4. In the virtual proxy edition, in Properties> Advanced, add this in the "Additional response header" section: Access-Control-Allow-Origin: *
    5. Again in QMC go to CONFIGURE SYSTEM> Certficates
    6. Export the certificate, giving it the name on the Node.js machine. By default it will be saved in C: \ ProgramData \ Qlik \ Sense \ Repository \ Exported Certificates
    7. Copy the client certificate to the root of the Node.js project

How it works:

  1. The script.js file attempts to load the configured Qlik Sense Server qlik.js;
  2. At this point the 'Authentication module redirect URI' in the virtual proxy is called;
  3. This is solved by the server.js file and creates a hardcode user called "sample";
  4. The qlik-auth module is called to send a ticket request with the specified configuration;
  5. A ticketId is returned and the session established;
  6. No user input is required.

OBS: Note that, at the time of this tutorial, Qlik made an update that disabled the use of this method on a machine that does not have Qlik Sense (Server) installed. That is, you will need to run Node and Qlik Sense on the same machine, whether virtual or not.

es6-qlik-sense-auth's People

Contributors

joanpedro avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.