Comments (3)
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.
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.
The v2.0.0 release is complete. This should now be possible through custom extractor functions. Closing.
from passport-jwt.
Related Issues (20)
- Multiple JWKS URIs HOT 4
- "TypeError: JwtStrategy requires a secret or key" with NestJS HOT 5
- Disallow None algorithm by default HOT 6
- Project Status HOT 8
- Passport-jwt extractor fromUrlQueryParameter don't handle handshake requests (websocket) HOT 1
- I'm always unauthorized. HOT 2
- How to ignore ignoreExpiration for a specific endpoint? HOT 1
- Add Custom extractor which takes JwtFromRequestFunction as argument HOT 1
- Provide own jwt-verify option HOT 1
- Is cookieExtractor buggy?
- How to create new jwt Token HOT 1
- vulnerability in passport-jwt's dependancy jsonwebtoken HOT 7
- JWT verification for auth code or PKCE flow HOT 1
- jsonwebtoken update to ^9.0.0 in [email protected] was a breaking change HOT 1
- [email protected] > [email protected] vulnerability HOT 1
- TypeError: JwtStrategy requires a secret or key getting this error while running in node.js
- Passport authentication with JWTStrategy not working even jwt is not getting called even the console.log({ jwt_payload }); is not getting called HOT 2
- use `request.header(AUTH_HEADER)` instead of `request.headers[AUTH_HEADER]`
- Confirm if development is still active HOT 1
- MongooseError: Model.findOne() no longer accepts a callback
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from passport-jwt.