Qlik Community

Integration, Extension & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
QlikWorld online is next week! REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Authenticating with QlikSense server from a web application

Hi,

Looking for some advice as I've found the QlikSense server documentation very confusing around authentication.

I have an AngularJS app, hosted on Tomcat on Windows, which users log in to via the initial login page. I was instructed by Qlik to look on Qlik Branch to get some Java code that would obtain a Qlik ticket to use for authentication against the QlikSense server. This works fine, and the ticket is returned to my app.

This isn't enough apparently to authenticate with Qlik Sense. I was instructed to create then hit a static html file on the Qlik server itself, passing the ticket in the URL, and redirecting back to my app.

My issue is that this seems a very clunky process - Both having to use bespoke code and then hit a URL with a redirect, which is causing me issues as the web app is hosted on Tomcat (HTTP) and QlikSense on another web server (HTTPS) causing certificate and cross-site issues.

Does anyone know a cleaner or easier way to authenticate, especially replacing or doing away with the URL/redirect part. I've heard mention that when including a Qlik App via the single configurator the ticket can be appended to the URL, but I've not seen this documented anywhere.

Thanks in advance,

Lee

1 Solution

Accepted Solutions
Alexander_Thor
Employee
Employee

Hmm, the redirect is not necessary.

Once you have a ticket issued for your client you can request a static resource from behind the proxy with qlikTicket=<ticket value> appended to the url.

The proxy will see the incoming ticket, make sure it's valid and if so send back the resource and a session cookie which will authenticate subsequent requests. Normal web rules apply so make sure http headers are correct so cookies are allowed between protocols and domains.

View solution in original post

2 Replies
Alexander_Thor
Employee
Employee

Hmm, the redirect is not necessary.

Once you have a ticket issued for your client you can request a static resource from behind the proxy with qlikTicket=<ticket value> appended to the url.

The proxy will see the incoming ticket, make sure it's valid and if so send back the resource and a session cookie which will authenticate subsequent requests. Normal web rules apply so make sure http headers are correct so cookies are allowed between protocols and domains.

Not applicable
Author

Thanks for getting back so quickly Alexander.

I'll give that a go - Makes sense to get the headers right first to remove them from the equation.

Lee