
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
passport-anonymous
Advanced tools
Passport strategy for anonymous authentication.
This module lets you provide anonymous authentication in your Node.js applications. By plugging into Passport, anonymous authentication can be easily and unobtrusively integrated into any application or framework that supports Connect-style middleware, including Express.
$ npm install passport-anonymous
The anonymous authentication strategy passes authentication for a request,
with req.user
remaining undefined
.
passport.use(new AnonymousStrategy());
Use passport.authenticate()
, specifying the 'anonymous'
strategy, to
pass authentication of a request. This is typically used alongside a strategy
that verifies credentials, as a fallback for routes that prefer authentication
but can also respond to unauthenticated requests.
For example, as route middleware in an Express application:
app.post('/hello',
passport.authenticate(['basic', 'anonymous'], { session: false }),
function(req, res) {
if (req.user) {
res.json({ name: req.user.username });
} else {
res.json({ name: 'anonymous' });
}
});
For a complete, working example, refer to the login example.
$ npm install
$ npm test
Copyright (c) 2012-2013 Jared Hanson <http://jaredhanson.net/>
FAQs
Anonymous authentication strategy for Passport.
The npm package passport-anonymous receives a total of 36,921 weekly downloads. As such, passport-anonymous popularity was classified as popular.
We found that passport-anonymous demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.