it should still fix some issue Reason is that str.encode automatically adds linebreaks to long base64 strings. The code works well when you force a shorter input string, e.g. uid = uuid.uuid4().hex[:28] To avoid the linebreaks it's better to use:
it should still fix some issue OK. It took some hacking but I finally figured out that while I was sending a basic auth from my ajax call, the web api layer was receiving a negotiate auth. So I went into IIS disabled all auth on the web service save for anonymous. And then voila.
HTTP authentication header character limit for basic authentication?
wish helps you It seems the issue I was experiencing was due to the plugin / extension I was using with Mozilla Firefox, named RESTClient; which I was using to test my REST API. I switched to Google Chrome, and gave the POSTMAN plugin / extension a try, and my 30 character API Key and API Secret worked splendidly. With RESTClient, the requests didn't even try to execute. No responses, nothing.
The HTTP request is unauthorized with client authentication scheme 'Basic'. The authentication header received from the