cholalabs / passport-localapikey Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hi;
I am using AFNetworking library to use my REST API. It sends credentials via headers, but passport-localapikey reads them from body or query. Is it a way that passport-localapikey reads credentials from header?
Thank you
Good afternoon, could you deliver this version on npm? I really need some updates on the npm version, especially reading the apikey from headers.
Thanks
habi
It misses the req.header checking
The example shows two pre-generated api keys to use for authentication purposes. I need new users to sign up and have new api keys generated for them. Is this possible? And if so, how? Thank you.
There is a forked version of this project which is being maintained here:
https://github.com/antgraf/passport-localapikey
It is published to npm under a different name, passport-localapikey-update
(since the owner of this project has not responded):
https://www.npmjs.com/package/passport-localapikey-update
Feel free to use the forked version for future updates. If @cholalabs comes back to this project, then perhaps we can merge the fork back into this project and continue development here. Until then, we can use the fork.
Hope that helps others ๐
I am using passportjs library for authenticating the user with api key. What I am trying to do is that along with api key. I also want to check the host name of the request.
app.post('/api/authenticate',
passport.authenticate('localapikey'),
function(req, res) {
console.log('Authenticated');
});
I don't know how passportjs calling the below function. But it definitely calling the function after a post request is coming to the path '/api/authenticate'. I also want to access the req.host in the below function.
passport.use(new LocalStrategy(
function(apikey, done) {
console.log(req.host);
}
Is it possible? Any insight into this would highly be appreciated. Thank you
Hi! Is there any plan to release the new version to the NPM registry in a near future?.
Thanks!
Hi, first - great job with this repo. Can you add req.params to apikey lookup? I did it by myself but I think it would be a good feature for out-of-box.
You seem too busy to maintain this repo, please add myself or others as collaborators and authors on npm. Passportjs org might also accept ownership.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.