1.1.0 • Published 9 years ago
hapi-tiny-auth v1.1.0
hapi-tiny-auth
Just enough authentication to make an API private. This Hapi plugin will allow only one set of configured credentials to access any of the API's endpoints. Must be used with hapi-auth-basic.
Install
$ npm i hapi-tiny-auth --saveRegister
const Hapi = require('hapi');
const server = new Hapi.Server();
server.register([
  require('hapi-auth-basic'),
  {
    register: require('hapi-tiny-auth'),
    options: {
      username: 'USERNAME', // required
      password: 'PASSWORD'  // optional
    }
  }
], (err) => {
});