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

Readme

Keywords

none

Package Sidebar

Install

npm i fndn-auth-simple

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • baseio