python-consul icon indicating copy to clipboard operation
python-consul copied to clipboard

put token to header if present

Open kapucko opened this issue 6 years ago • 2 comments

Hi,

according to latest consul documentation for authentication: https://www.consul.io/api/index.html#authentication, consul client should insert token to the header when sending requests to agent.

This is my implementation, hopefully it'll help somebody.

Thank you for your great work.

Dominik

kapucko avatar Mar 21 '18 14:03 kapucko

@cablehead I tried to fix tests but there is still this issue: ValueError: Plugin already registered: pytest_twisted=<module 'pytest_twisted' from '/home/travis/build/cablehead/python-consul/.tox/py27/lib/python2.7/site-packages/pytest_twisted.py'>

I have seen it also it other PRs. Could you help me please? Thank you.

kapucko avatar Mar 22 '18 08:03 kapucko

I took a very similar approach in my pull request (#205). I guess I should have checked here before submitting mine. It's a bit encouraging that you also ran into issues with the unit tests.

tolmanam avatar Apr 02 '18 14:04 tolmanam