Middleware for restify to check authentication as per the Heroku Addon specs: basic authentication with username and password stored in
addon-manifest.json
All calls should be protected by HTTP basic auth with the add-on id and password specified in your add-on manifest. – Heroku Add-on Provider API
$ npm install --save heroku-addon-auth
options = {
log : console
};
restify = require('restify');
server = restify.createServer(options);
server.use(restify.authorizationParser());
server.use(require('heroku-addon-auth')(options));
Note that the Authorization Parser needs to be installed before heroku-addon-auth
.
restify uses the same Middleware function pattern as expresss, function middleware(req,res,next)
, which should make it very easily portable to Express and similar servers.
One restify
-specific requirement is that the Authorization Parser must be used before calling this module.
Find a bug? Have a feature request? Please create an Issue.
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality,
and run docs
in the command line to build the docs with Verb.
Pull requests are also encouraged, and if you find this project useful please consider "starring" it to show your support! Thanks!
Andreas Pizsa
Copyright (c) 2014 Andreas Pizsa, contributors.
MIT License.
This file was generated by verb-cli on September 02, 2014.