question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTTP header authentication: why "Authorization: JWT {token}" instead of "Authorization: Bearer {token}"?

See original GitHub issue

First of all, thanks for this library, it is very useful!

While integrating this with my website, I noticed I need to use Authorization: JWT {token} instead of the standard Authorization: Bearer {token}.

image

Was there a reason for this choice? I think it creates some confusion.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
dtrodgercommented, May 16, 2021

You can set the JWT_AUTH_HEADER_PREFIX in your Django settings module to to Bearer.

GRAPHQL_JWT = {
    "JWT_AUTH_HEADER_PREFIX": "Bearer"
}
0reactions
philihpcommented, Jan 10, 2022

Agree that this is confusing. Would you be open to support both Bearer and JWT by default, or to switch to Bearer on the next major version? I’m happy to throw up a PR if this would be considered.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is 'Bearer' required before the token in 'Authorization ...
A Bearer Token is set in the Authorization header of every Inline Action HTTP Request and Bearer itself determines the type of ...
Read more >
Bearer Authentication - Swagger
Bearer authentication (also called token authentication) is an HTTP authentication scheme that involves security tokens called bearer tokens.
Read more >
Why does JWT need to be sent as a Bearer Token header?
The Authorization header is not specific to JWTs and its role is to specify an auth scheme between the client and the server....
Read more >
How to send a GET Request with Bearer Token Authorization ...
HTTP authentication is performed by sending authentication credentials in the authorization header to access the protected resource. Bearer ...
Read more >
What is Bearer token and How it works? - DevOpsSchool.com
This is a single string which acts as the authentication of the API request, sent in an HTTP “Authorization” header. The string is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found