Comments (7)
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.
Sounds great - thanks!
from elasticsearch-php.
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.
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.
Just a quick update:
I've now tried the authentication, and it works like a treat - thanks!
from elasticsearch-php.
Great! Glad its working out, lemme know if you run into any problems :)
from elasticsearch-php.
i can confirm, works like a charm with es 1.7.3 and the elasticsearch-jetty plugin
from elasticsearch-php.
Related Issues (20)
- Path in hosts configuration is ignored HOT 2
- check the index exsists ,it have a error HOT 1
- Connecting to Elasticsearch v8.x using the v7.17.x client HOT 1
- Received a 403 Forbidden error when attempting to index HOT 1
- `Response\Elasticsearch::offsetGet()` return type declaration HOT 2
- Need a new Release 6.8.3 HOT 4
- ServerError was not handled correctly. HOT 2
- Add support for Elasticsearch with Bulk API and data stream HOT 1
- How to pass specific characters password to ElasticSearch through Sulu/ArticleBundle HOT 5
- [Request feedback] Looking for feedback about the UX experience
- Calling static trait method ... is deprecated HOT 1
- Inquiries about version use HOT 2
- [Proposal] Add a mapTo(class) function for map ES|QL response into objects HOT 1
- Why Can't I update the mapping with Laravel Scout? HOT 1
- 使用PHP GET方法,不能获取到文档内容 HOT 4
- please help me change the php code from pagination from + size to search_after HOT 5
- failed to get the last sort using search_after HOT 1
- Add OpenTelemetry support HOT 1
- will elasticsearch-php pre-open the urls on the page when I visit it? HOT 3
- "Type: illegal_argument_exception Reason: "Fielddata is disabled on [pageCategory] in [elastic_web_index]. Text fields are not optimised for operations that require per-document field data like aggregations HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elasticsearch-php.