title: CORS authentication with jQuery
body: <p>I've read a lot of documentation about CORS and authentication, and I'm pretty sure to do things correctly. I'm trying to authenticate a jQuery.ajax GET CORS request, like this:</p>
  
  <pre><code>$.ajax('http://httpbin.org/basic-auth/foo/bar', {
      type: 'GET',
      username: 'foo',
      password: 'bar',
      xhrFields: {
          withCredentials: true
      }
  }).then(function (data) {
      alert('success');
  }, function (xhr) {
      alert('failure');
  });
  </code></pre>
  
  <p>but the browser keeps prompting me for credentials, not sending the provided ones. Try this at <a href="http://jsfiddle.net/BpYc3/" rel="nofollow">http://jsfiddle.net/BpYc3/</a> where <a href="http://httpbin.org" rel="nofollow">http://httpbin.org</a> is supposed to send correct CORS headers.</p>