ApiKey should take precedence over basic auth (#1115)
* ApiKey should take precedence over basic auth * Updated docs * Updated test
This commit is contained in:
committed by
GitHub
parent
6bf04473c9
commit
9a9057db9e
@ -41,6 +41,8 @@ const client = new Client({
|
||||
You can provide your credentials by passing the `username` and `password`
|
||||
parameters via the `auth` option.
|
||||
|
||||
NOTE: If you provide both basic authentication credentials and the Api Key configuration, the Api Key will take precedence.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
const { Client } = require('@elastic/elasticsearch')
|
||||
@ -74,6 +76,8 @@ authentication by passing the `apiKey` parameter via the `auth` option. The
|
||||
values that you can obtain from the
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-create-api-key.html[create api key endpoint].
|
||||
|
||||
NOTE: If you provide both basic authentication credentials and the Api Key configuration, the Api Key will take precedence.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
const { Client } = require('@elastic/elasticsearch')
|
||||
|
||||
Reference in New Issue
Block a user