denim-api-auth-middleware
Api Key authorization middleware for Express
Getting Started
yarn add denim-api-auth-middleware
Prerequisites
Tested with Express 4
Installing
install package
yarn add denim-api-auth-middleware
- OR -
npm install denim-api-auth-middleware
most basic setup
import Express from 'express'
import makeApiKeyAuthMiddlware from 'denim-api-auth-middleware'
const app = new Express()
//Note: production keys should be randomly generated. See https://github.com/substack/node-hat
const API_KEYS = {
mySecretKey: 'mySecretPassword'
}
const apiKeyAuthMiddlware = makeApiKeyAuthMiddleware(API_KEYS) //initialize
app.use(apiKeyAuthMiddlware) // API Key auth middleware
Running the tests
Not yet implemented.
Deployment
npm version NEWVER
npm publish
Built With
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Authors
License
This project is licensed under the MIT License - see the LICENSE.md file for details