New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

egg-http-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

egg-http-auth

egg plugin for HTTP basic and digest access authentication

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

egg-http-auth

NPM version build status Test coverage David deps Known Vulnerabilities npm download

egg plugin for HTTP basic and digest access authentication.

Install

$ npm i egg-http-auth --save

Usage

// {app_root}/config/plugin.js
exports.httpAuth = {
  enable: true,
  package: 'egg-http-auth',
  // which routes you want to using this middleware
  match: '',
  // which routes you want to ignore this middleware
  // ignore: ''
  // match: (ctx) {
  // }
};

Configuration

// {app_root}/config/config.default.js
exports.httpAuth = {
  username: 'username',
  password: 'password',
};

see config/config.default.js for more detail.

Example

// for old version eggjs which does support match options
// {app_root}/config/config.default.js
exports.httpAuth = {
  username: 'username',
  password: 'password',
  match: /^\/api\/v1\/backdoor/
};

Questions & Suggestions

Please open an issue here.

License

MIT

Keywords

egg

FAQs

Package last updated on 02 Jul 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