New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

express-json-auth

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-json-auth

Run express basic http auth from a user json file

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

express-json-auth

Run express basic http auth from a user json file.

npm install express-json-auth --save

Usage example:

user.json

{
	"ted": "123321",
	"bear": "123456"
}

server.js

var app  = require('express')(),
	auth = require('express-json-auth')(); // default path: process cwd dir + user.json

// throughout the app
app.use(auth);

// through a route
app.get('/admin', auth, function (req, res) {
	res.send('Logged!');
});
Specific json
...
auth = require('express-json-auth')('./private/admin.json');
...
Object
...
users = {
	"ted": "123321",
	"bear": "123456"
},
auth  = require('express-json-auth').plain(users);
...

Release notes

  • 0.0.1 - First release - Basic auth from a json

License

MIT License (c) Helder Santana

Keywords

FAQs

Package last updated on 14 Feb 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc