fndn-auth-simple

1.0.0 • Public • Published

fndn-auth-simple

Ultra simple authentication middleware, that:

  • reads a list of tokens from process.env.TOKENS
  • checks all requests for a x-auth-token header
  • calls next() if :
    • req.path starts with 'pub' (to allow public endpoint)
    • req is from localhost

Poor, indeed, but often all we need.

It also igonres request for /favicon.ico

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    2
  • 0.0.7
    1

Package Sidebar

Install

npm i fndn-auth-simple

Weekly Downloads

3

Version

1.0.0

License

MIT

Last publish

Collaborators

  • baseio