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

Get the jwt from another field from header #1244

Closed
mohameds786 opened this issue May 26, 2020 · 2 comments
Closed

Get the jwt from another field from header #1244

mohameds786 opened this issue May 26, 2020 · 2 comments

Comments

@mohameds786
Copy link

Description

Hello.

I am using connexion for API.
Actually I have generated python code for an API which use jwt token for security.
The jwt token is got from the "Authorization" parameter of the request header.
Is it possible to customize this behavior in order to get it from another parameter?

Expected behaviour

Imagine that in the HTTP header I have
Authorization: "something but not the jwt"
JWT-Authorization: "something which is the jwt"

When I call an operation of my API, I want the security_controller to get "something which is the jwt" as the JWT but actually it takes "something but not the jwt"

Does someone have an idea?

Thank you very much

@apatap
Copy link

apatap commented Nov 24, 2020

Since bearer authentication requires a header called "Authorization", how about using api key authentication, where the header name can be freely chosen?

In this example "X-Auth" is used as header name.

@RobbeSneyders
Copy link
Member

This is according to spec.

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

3 participants