Qlik Community

Ask a Question

Integration, Extension & APIs

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

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
mapa_demo
Contributor II
Contributor II

Problem node.js authentication with qliksense

hello guys, I would like to see if anyone could help me with qlik authentication with node.js, I created the file with the information below (login.js):

mapa_demo_2-1597765730412.png

 


-------------------------------------------------- ---------------------------------------
var http = require ('http');
var qlikauth = require ('qlik-auth');
http.createServer (function (req, res) {

var profile = {
'UserDirectory': 'QLIKSENSE',
'UserId': 'test'
}

var options = {
'Certificate': './client.pfx',
'PassPhrase': '123456'
}

qlikauth.requestTicket (req, res, profile, options);
}). listen (1337, '0.0.0.0');
console.log ('Server running http: // localhost: 1337 /');
-------------------------------------------------- ---------------------------------------
I start the service in cmd and the localhost: 1337 page returns the following message:

"Missing parameters"


even so when I try to enter through the virtual proxies that I created it gives the error

mapa_demo_1-1597765704700.png

 

Qlik Sense
400
Incorrect request

The HTTP request header is incorrect.

Can someone help me?

user

mapa_demo_3-1597765781339.png

 

proxy virtual

mapa_demo_4-1597765818357.png

config

mapa_demo_5-1597765842552.png

 

 

 

 

Labels (2)
1 Solution

Accepted Solutions
rzenere_methode
Partner
Partner

As far as I know, there is no documentation/tutorial provided by Qlik to build a solution based on nodeJS. There is an example provided by Qlik, but it's in C#: https://help.qlik.com/en-US/sense-developer/June2020/Subsystems/ProxyServiceAPI/Content/Sense_ProxyS...


Also QlikLogin, that I linked in the previous post, should be considered 'provided as is' for what I know... 

Riccardo

View solution in original post

7 Replies
rzenere_methode
Partner
Partner

Good evening @mapa_demo ,

I would suggest to take a look at johsund's QlikLogin, which is an implementation of authentication with nodeJS
I personally used it in many situations and can confirm that it works smoothly.

The only point of attention is that in the version you find on GitHub QlikLogin uses HTTPS (while in your example you're using HTTP)... I don't know if that makes any difference to you.

I hope this helps,
Riccardo

mapa_demo
Contributor II
Contributor II
Author

would have the link to the documentation or tutorial with example

Tks @rzenere_methode 

rzenere_methode
Partner
Partner

As far as I know, there is no documentation/tutorial provided by Qlik to build a solution based on nodeJS. There is an example provided by Qlik, but it's in C#: https://help.qlik.com/en-US/sense-developer/June2020/Subsystems/ProxyServiceAPI/Content/Sense_ProxyS...


Also QlikLogin, that I linked in the previous post, should be considered 'provided as is' for what I know... 

Riccardo

View solution in original post

mapa_demo
Contributor II
Contributor II
Author

Hi, how are you?

I followed your QlikLogin guidance, I made the settings, apparently you are logging into AD correctly, but when you redirect to the hub it does not open, see the settings below that I made using the tutorial

mapa_demo_0-1597844565211.png

Screenshot_10.jpg

Sem título.png

te.png

 

do you know what could be the error?

thank you very much

 

 

rzenere_methode
Partner
Partner

Hey @mapa_demo ,

is the virtual proxy connected to the proxy service?
Also, did you configure the host white list on the virtual proxy?
What if you connect to QS using the server name (qliksense)?

Alternatively, seeing that you're initially connecting to QS calling it with localhost, would you mind trying to change to localhost also the config.REDIRECT and config.RESTURI? (I personally didn't try with localhost, but it's still worth trying)

Riccardo

mapa_demo
Contributor II
Contributor II
Author

it worked, I was talking about putting it on the white list

mapa_demo
Contributor II
Contributor II
Author

I can change to open qrs api?

 

erooqrs.jpg

I'm not getting