Skip to content

Commit

Permalink
add support for token auth type used by taxii2client
Browse files Browse the repository at this point in the history
  • Loading branch information
benjwebster committed Aug 4, 2023
1 parent aea56b7 commit 07e6399
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions opentaxii/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ def _authenticate(server, headers):

token = server.auth.authenticate(username, password)

# Support `token` type provided by `taxii2client` library
# https://github.com/oasis-open/cti-taxii-client/blob/54dabadf1a67517e99e6a8f2961614a2a4f5ad2c/taxii2client/common.py#L138
elif auth_type == "token":
token = raw_token

elif auth_type == "bearer":
token = raw_token
else:
Expand Down

0 comments on commit 07e6399

Please sign in to comment.