plex-api-credentials
Advanced tools
Comparing version
@@ -13,2 +13,5 @@ 'use strict'; | ||
// creds to https://github.com/mafintosh/to-buffer for knowing when Buffer.from() is available (Node 5 & above) | ||
var makeBuffer = Buffer.from && Buffer.from !== Uint8Array.from ? Buffer.from : createBufferForNode4AndBelow; | ||
function CredentialsAuthenticator(options) { | ||
@@ -147,5 +150,9 @@ EventEmitter.call(this); | ||
function createBufferForNode4AndBelow(buf, enc) { | ||
return new Buffer(buf, enc); | ||
} | ||
function authHeaderVal(username, password) { | ||
var authString = username + ':' + password; | ||
var buffer = new Buffer(authString.toString(), 'binary'); | ||
var buffer = makeBuffer(authString.toString(), 'binary'); | ||
return 'Basic ' + buffer.toString('base64'); | ||
@@ -152,0 +159,0 @@ } |
{ | ||
"name": "plex-api-credentials", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Credentials authentication for plex-api", | ||
@@ -23,6 +23,6 @@ "main": "index.js", | ||
"jscs": "^3.0.0", | ||
"jshint": "^2.8.0", | ||
"mocha": "^2.5.0", | ||
"nock": "^8.0.0", | ||
"plex-api": "^3.2.0", | ||
"jshint": "2.10.2", | ||
"mocha": "5.2.0", | ||
"nock": "9.6.1", | ||
"plex-api": "5.2.2", | ||
"sinon": "^1.17.2" | ||
@@ -33,4 +33,4 @@ }, | ||
"plex-api-headers": "1.1.0", | ||
"request-promise": "^3.0.0", | ||
"xml2js": "^0.4.16" | ||
"request-promise": "4.2.4", | ||
"xml2js": "0.4.19" | ||
}, | ||
@@ -37,0 +37,0 @@ "engines": { |
11600
2.69%142
3.65%+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
Updated
Updated