Socket
Socket
Sign inDemoInstall

basic-auth

Package Overview
Dependencies
1
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 2.0.0

7

HISTORY.md

@@ -0,1 +1,8 @@

2.0.0 / 2017-09-12
==================
* Drop support for Node.js below 0.8
* Remove `auth(ctx)` signature -- pass in header or `auth(ctx.req)`
* Use `safe-buffer` for improved Buffer API
1.1.0 / 2016-11-18

@@ -2,0 +9,0 @@ ==================

11

index.js

@@ -12,2 +12,9 @@ /*!

/**
* Module dependencies.
* @private
*/
var Buffer = require('safe-buffer').Buffer
/**
* Module exports.

@@ -60,3 +67,3 @@ * @public

// get header
var header = getAuthorization(req.req || req)
var header = getAuthorization(req)

@@ -73,3 +80,3 @@ // parse header

function decodeBase64 (str) {
return new Buffer(str, 'base64').toString()
return Buffer.from(str, 'base64').toString()
}

@@ -76,0 +83,0 @@

21

package.json
{
"name": "basic-auth",
"description": "node.js basic auth parser",
"version": "1.1.0",
"version": "2.0.0",
"license": "MIT",

@@ -13,10 +13,15 @@ "keywords": [

"repository": "jshttp/basic-auth",
"dependencies": {
"safe-buffer": "5.1.1"
},
"devDependencies": {
"eslint": "3.10.2",
"eslint-config-standard": "6.2.1",
"eslint-plugin-markdown": "1.0.0-beta.3",
"eslint-plugin-promise": "3.4.0",
"eslint-plugin-standard": "2.0.1",
"eslint": "3.19.0",
"eslint-config-standard": "10.2.1",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-markdown": "1.0.0-beta.6",
"eslint-plugin-node": "5.1.1",
"eslint-plugin-promise": "3.5.0",
"eslint-plugin-standard": "3.0.1",
"istanbul": "0.4.5",
"mocha": "1.21.5"
"mocha": "2.5.3"
},

@@ -29,3 +34,3 @@ "files": [

"engines": {
"node": ">= 0.6"
"node": ">= 0.8"
},

@@ -32,0 +37,0 @@ "scripts": {

@@ -42,5 +42,4 @@ # basic-auth

Pass a node request or koa Context object to the module exported. If
parsing fails `undefined` is returned, otherwise an object with
`.name` and `.pass`.
Pass a Node.js request object to the module export. If parsing fails
`undefined` is returned, otherwise an object with `.name` and `.pass`.

@@ -47,0 +46,0 @@ <!-- eslint-disable no-unused-vars, no-undef -->

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc