Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for token auth type used by taxii2client #255

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

benjwebster
Copy link

taxii2client supports authentication with a token header by default.

This change adds it as a valid token type to forward to upstream authentication implementations.

from taxii2client.v21 import Server
from taxii2client.common import TokenAuth

api_key = "1234567890"
token_auth = TokenAuth(api_key)
server = Server('https://demo.eclecticiq.com/taxii2/', auth=token_auth)

Example Headers:

Cf-Visitor: {"scheme":"https"}
User-Agent: taxii2-client/2.3.0
Accept: application/taxii+json;version=2.1
Authorization: Token 12345678936f70aea7c1dc7bc4f6f6cf1bedde77f2aea969fdb50cd123456789
Cdn-Loop: cloudflare

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant