Skip to content

Commit 2a3df7f

Browse files
committed
IDEV-2028: Use non-header authentication for real time threat intelligence download endpoints.
1 parent 11b1357 commit 2a3df7f

File tree

5 files changed

+18726
-10
lines changed

5 files changed

+18726
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ Custom parameters aside from the common `GET` Request parameters:
226226
api = API(USERNAME, KEY, always_sign_api_key=False)
227227
api.nod(endpoint="feed", **kwargs)
228228
```
229-
- `header_authentication`: by default, we're using API Header Authentication. Set this False if you want to use API Key and Secret Authentication. Apparently, you can't use API Header Authentication for `download` endpoints so you need to set this to `False` when calling `download` API endpoints.
229+
- `header_authentication`: by default, we're using API Header Authentication. Set this False if you want to use API Key and Secret Authentication. Apparently, you can't use API Header Authentication for `download` endpoints so this will be defaulted to `False` even without explicitly setting it.
230230
```python
231231
api = API(USERNAME, KEY, always_sign_api_key=False)
232232
api.nod(header_authentication=False, **kwargs)

domaintools/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,5 @@ def validate_feeds_parameters(params):
185185
raise ValueError(f"{format} format is not available in {Endpoint.DOWNLOAD.value} API.")
186186

187187
if endpoint == Endpoint.DOWNLOAD.value and params.get("header_authentication", True):
188-
raise ValueError(f"{Endpoint.DOWNLOAD.value} API does not support header authentication. Provide api_key in the parameter")
188+
# For download endpoint, header_authentication will be False by default
189+
params["header_authentication"] = False

0 commit comments

Comments
 (0)