Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows authentication using phantomjs

I'm looking into phantomjs as a possible solution for UI automation in my latest project, but I can't seem to get windows authentication to work properly. I've tried setting the page.settings.userName and page.settings.password, but the snippet below always gets a 401 and the underlying stack makes no effort to resolve it. My search-fu has failed me, so I come to the community to ask for help.

var page = require('webpage').create();

page.onResourceReceived = function(response) {
    phantom.exit(response.status);
};

page.open('http://bing.com');
like image 844
Neil Avatar asked Nov 19 '13 20:11

Neil


1 Answers

There is an open PhantomJS Issue with ongoing discussion. It appears that PhantomJS does not support (automatic/integrated) NTLM Authentication, meaning that it will not work against a server that requires Integrated Windows Authentication.

like image 99
Adrian Russell Avatar answered Oct 19 '22 19:10

Adrian Russell