New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hapi-init-auth

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-init-auth

This plugin makes it easy to authenticate via HTTP Basic Auth.

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

HAPI INIT - Authentication Plugin

This plugin makes it easy to authenticate via HTTP Basic Auth.

Usage

Install via npm:

$ npm install --save hapi-init-auth

Require authentication:

// Configure users, can be multiple: Template code here.
const users = {
  {{username}}: {
    username: '{{username}}',
    password: '{{encryted password}}',
    name: '{{name}}',
    id: '{{id}}'
  }
};

const Auth = require('hapi-init-auth');

// In HAPI registration
server.register([], (error) => {
  if (error) {
    throw error;
  }

  server.auth.strategy('simple', 'basic', {
    validateFunc: new Auth(users)
  });
});

FAQs

Package last updated on 07 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc