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.

Uses non-recommended authentication scheme

See original GitHub issue

passport-jwt’s ExtractJwt.fromAuthHeader() uses the following http header:

Authorization: JWT JSON_WEB_TOKEN_STRING.....

But RFC 6750 clearly specifies that access token based authentication must use Bearer as the authentication token. The non-recommended scheme specification would lead to conflicts.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
akoskmcommented, Feb 8, 2017

For the sake of completeness, the code for the rfc6750 variant goes like this:

jwtOptions.jwtFromRequest = ExtractJwt.fromAuthHeaderWithScheme('Bearer');

use this with the example provided in https://github.com/themikenicholson/passport-jwt#configure-strategy.

Thanks @themikenicholson for putting this together! 🍾

1reaction
mikenicholsoncommented, Dec 20, 2016

@JemiloII Authorization headers typically contain an authentication scheme along with the token or auth parameter. I think it was RFC 2617. I’m going to stick with the RFC compliant behavior.

If you don’t like the standard behavior you can write your own extractor function.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uses non-recommended authentication scheme #87 - GitHub
Technically speaking, JWT is the "custom auth scheme", while Bearer is the standards compliant scheme required by the JWT specification itself ...
Read more >
Developers - Uses non-recommended authentication scheme -
Uses non-recommended authentication scheme. ... fromAuthHeader() uses the following http header: Authorization: JWT JSON_WEB_TOKEN_STRING.
Read more >
Microsoft Security Bulletin MS00-035 - Critical
When run on a machine that is configured in a non-recommended mode, ... In Mixed Mode, clients are authenticated using Windows NT ...
Read more >
What is SSO? - Single sign-on - AWS
Single sign-on (SSO ) is an authentication solution that allows users to log in to multiple applications and websites with one-time user authentication....
Read more >
Security Guidelines for UICC Profiles Version 1.0 12 June 2020
The AKA scheme is based on a sequence number to allow the (e)UICC to authenticate the network. AKA uses either a time based...
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