401 when auth agains Form based virtual proxy from Node.js
I have a Node.js application that is trying to login the user via virtual proxy and its using the returned session id to perform additional operations. The user is providing the username/password in the console.
The setup is that we have 2 virtual proxies - windows based and form based. Both VP are almost the same and the differences are:
- in "Windows authentication pattern" property - one being "Windows" and the other "Form"
- the "Session coookie header name" are different (as it should be)
The Node.js script approach is to try and authenticate the user with the provided user and pass. Once Qlik replies with 302 the script is getting the new location and sends request to it (with the user/pass) and once the login is complete the script is extracting the session cookie.
The script is adding the user agent as "Form" in both cases: {"User-Agent":"Form"}
The problem is with the Form based VP. It always responds with 401. If i change the config and use the same script but against the Windows based VP im able to login.
Any idea if there is something specific when the VP is set as Form?