Skip to content
This repository has been archived by the owner on May 26, 2020. It is now read-only.

[feature] permit to use custom header instead of Authorization #472

Open
thomasboni opened this issue Mar 26, 2019 · 0 comments
Open

[feature] permit to use custom header instead of Authorization #472

thomasboni opened this issue Mar 26, 2019 · 0 comments

Comments

@thomasboni
Copy link

thomasboni commented Mar 26, 2019

Permit to use another header than Authorization to retrieve token.

Current and suggested behavior

Current: this module permit only to use the standard header Authorization
Suggested: permit to user to define a custom header name

Why would the enhancement be useful to most users

For example:
I have a Django API which uses this module to manage authentication with JWT. I run this API in 2 environment: stage and production. Both behind a nginx proxy.

  • On production: it works perfectly: my client use the Authorization header to give JWT to API
  • On stage: I want to protect my stage environment with a password and without any change to API code.
    • I configure basic_auth in nginx which use the Authorization header.
    • Like in production, my API uses the Authorization header.
    • I have a header conflict...

In this example, I want to use a custom header (ex X-Authorization) in order to avoid conflict and provide both header for nginx & api authentication.

Example from stackoverflow: https://stackoverflow.com/questions/22229996/basic-http-and-bearer-token-authentication

@thomasboni thomasboni changed the title [feature] permit to use custom header name for Authorization [feature] permit to use custom header instead of Authorization Mar 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant