inorganik / digest-auth-request

Make digest-auth requests with vanilla javascript
MIT License
70 stars 49 forks source link

Getting 401 using the library #13

Closed unaor closed 9 years ago

unaor commented 9 years ago

I hope you still maintain the library but a simple implementation is not working for me var req = new digestAuthRequest('GET', url, 'tester', 'tester'); is giving back 401 while the same in cURL is working i dont know if its related but in cURL im passing the credencials like this 'tester:tester'

inorganik commented 9 years ago

I used this on a client project that had a server using digest - that was over a year ago and I don't have access to test with it anymore. But it worked great then and it's worked for lots of people since.

You can at least do some basic debugging. Did you turn logging on? Did you get the digest headers back? If so, what were they?

inorganik commented 9 years ago

I just updated the script to log how it parses the returned headers, and as well I fixed a parsing issue. So please pull the latest version, and try again. Logging is turned on out of the box, so you shouldn't have to type any console.logs. You can turn it off by setting loggingOn to false.