Coder Social home page Coder Social logo

Comments (7)

polyfractal avatar polyfractal commented on September 24, 2024

Technically, there is a way to inject client auth details directly into Guzzle...but it is a really gross option.

I'll add an easy way to do it today. Thanks for bringing it up, basic auth has been on my todo list for a while and I just never got around to it :)

from elasticsearch-php.

motns avatar motns commented on September 24, 2024

Sounds great - thanks!

from elasticsearch-php.

polyfractal avatar polyfractal commented on September 24, 2024

Added to Master. Going to leave it untagged for now because I'm not happy with how it is being tested (very roundabout way to do it, by introspecting headers in the log file). I'd like to refactor things so it is more easily testable, then I'll tag it.

You can use it from master in the mean time, if you need that functionality right now.

Usage:

$params = array();
$params['connectionParams']['auth'] = array('username','password', 'Basic');
$client = new Elasticsearch\Client($params);

The third parameter supports: Basic, Digest, NTLM and Any.

Docs have been updated, and the usage will appear on the Configuration page once they regenerate.

from elasticsearch-php.

motns avatar motns commented on September 24, 2024

Wow, that was quick - thanks! 👍

I'll take it for a spin when I get a moment (probably tomorrow), and let you know if I come across any issues.

from elasticsearch-php.

motns avatar motns commented on September 24, 2024

Just a quick update:
I've now tried the authentication, and it works like a treat - thanks!

from elasticsearch-php.

polyfractal avatar polyfractal commented on September 24, 2024

Great! Glad its working out, lemme know if you run into any problems :)

from elasticsearch-php.

ulkas avatar ulkas commented on September 24, 2024

i can confirm, works like a charm with es 1.7.3 and the elasticsearch-jetty plugin

from elasticsearch-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.