Giter VIP home page Giter VIP logo

Comments (3)

mikenicholson avatar mikenicholson commented on June 20, 2024

From issue #20

I based the need to specify an auth-scheme based on RFC2617 "HTTP Authentication: Basic and Digest Access Authentication" section 1.2. This RFC specifies that the credentials supplied in the Authorization header take the format

credentials = auth-scheme #auth-param

Based on my reading of the RFC it does not appear that the auth-scheme can be considered optional.

For this implementation I'm going to stick with the RFC. I'm planning to overhaul how the JWT is parsed from the request in a 2.0.0 release in the near future. In the new version you will be able to provide a function which accepts a request and returns a JWT so client code has complete control with how the JWT is provided. Existing functionality will be baked into some commonly use retrieval functions that will be provided wit the strategy.

from passport-jwt.

mikenicholson avatar mikenicholson commented on June 20, 2024

The apiv2 branch is up. This branch uses a function to extract the JWT from the request allowing the user to pass the request any way they want If you want to try it out and provide feedback you can change the dependency in your package.json to match the following:

  "dependencies": {
    "passport-jwt": "git+https://github.com/themikenicholson/passport-jwt.git#apiv2"
  },

Looking forward to feedback and suggestions on the new api before I release it.

from passport-jwt.

mikenicholson avatar mikenicholson commented on June 20, 2024

The v2.0.0 release is complete. This should now be possible through custom extractor functions. Closing.

from passport-jwt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.