Unify auth handling in the Host class

- flatten auth config to an Authorization header when the Host is created
 - remove individual Authorization handling from connectors
 - removed incomplete support for per-request auth
 - use per-request headers to provide your own Authorization header per request
This commit is contained in:
Spencer Alger
2015-04-08 15:05:51 -07:00
parent 8b59530eed
commit 7f468d2064
10 changed files with 40 additions and 103 deletions

View File

@ -6,9 +6,11 @@ describe('elasticsearch namespace', function () {
it('is defined on the window', function () {
expect(es).to.be.ok();
});
it('has Client, ConnectionPool, Transport, and errors keys', function () {
expect(es).to.have.keys('Client', 'ConnectionPool', 'Transport', 'errors');
});
it('can create a client', function () {
var client = new es.Client({ hosts: null });
expect(client).to.have.keys('transport');