diff --git a/cogstack.py b/cogstack.py index 6bfb8b5..e6e2127 100644 --- a/cogstack.py +++ b/cogstack.py @@ -26,9 +26,8 @@ def __init__(self, hosts: List, username: Optional[str] = None, password: Option api: bool = False, timeout: Optional[int]=60): if api: - api_username, api_password = self._check_auth_details(username, password) self.elastic = elasticsearch.Elasticsearch(hosts=hosts, - api_key=(api_username, api_password), + api_key=api_key, verify_certs=False, timeout=timeout) else: diff --git a/credentials.py b/credentials.py index c70eda5..62193a6 100644 --- a/credentials.py +++ b/credentials.py @@ -8,6 +8,7 @@ username = None password = None +api_key = None # Encoded api key issued by your cogstack administrator. # NLM authentication # The UMLS REST API requires a UMLS account for the authentication described below.