Skip to content

Commit ae50a9e

Browse files
committed
Replaced outdated api_user api_password with api_key authentication method for Elasticsearch.
1 parent 8286c3e commit ae50a9e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cogstack.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ def __init__(self, hosts: List, username: Optional[str] = None, password: Option
2626
api: bool = False, timeout: Optional[int]=60):
2727

2828
if api:
29-
api_username, api_password = self._check_auth_details(username, password)
3029
self.elastic = elasticsearch.Elasticsearch(hosts=hosts,
31-
api_key=(api_username, api_password),
30+
api_key=api_key,
3231
verify_certs=False,
3332
timeout=timeout)
3433
else:

0 commit comments

Comments
 (0)