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

Should not rewrite custom auth headers from _request_options #373

Open
aviskase opened this issue Jun 14, 2018 · 0 comments
Open

Should not rewrite custom auth headers from _request_options #373

aviskase opened this issue Jun 14, 2018 · 0 comments

Comments

@aviskase
Copy link
Contributor

Hi, I'm using bravado for end-to-end checks. One use case is :

  1. Use default_apikey for every request
  2. Create new_apikey using API
  3. Check that requests with new_apikey applied work.

Currently to make this work one should wrap SwaggerClient/RequestsClient or create separate SwaggerClients for each api key. Reason is that ApiKeyAuthenticator.apply overwrites any custom auth headers from _request_options.

It would be better if ApiKeyAuthenticator.apply could skip setting request.headers[self.param_name] if this header already exists.

I suppose similar thing is applicable to other Authenticator variations.

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

No branches or pull requests

1 participant