Socket
Socket
Sign inDemoInstall

backblaze-b2

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backblaze-b2 - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

test/unit/lib/actions/authTest.js

12

CHANGELOG.md

@@ -1,4 +0,12 @@

### v0.9.0 - The bucket release
### v0.9.1 (November 21, 2015) - The moar tests release
Features implemented
Features
- Added tests for all existing code
Fixes
- Implementation internally of request module
### v0.9.0 (November 20, 2015) - The bucket release
Features
- Authorization

@@ -5,0 +13,0 @@ - Bucket Creation

2

lib/actions/auth.js

@@ -11,3 +11,3 @@ var q = require('q');

var requestInstance = request.getRequest();
var requestInstance = request.getInstance();
requestInstance(options, utils.getProcessAuthSuccess(b2, deferred));

@@ -14,0 +14,0 @@

@@ -24,2 +24,4 @@ var actions = require('./actions');

/*
B2.prototype.list_buckets = function() {};
B2.prototype.delete_file_version = function() {};

@@ -37,4 +39,2 @@

B2.prototype.list_buckets = function() {};
B2.prototype.list_file_names = function() {};

@@ -41,0 +41,0 @@

@@ -11,13 +11,6 @@ var q = require('q');

exports.getRequest = function() {
if (!REQUEST) {
REQUEST = require('request');
}
return REQUEST;
};
exports.sendRequest = function(options) {
var deferred = q.defer();
var requestInstance = exports.getRequest();
var requestInstance = exports.getInstance();
requestInstance(options, utils.processResponseGeneric(deferred));

@@ -27,1 +20,8 @@

};
exports.getInstance = function() {
if (!REQUEST) {
REQUEST = require('request');
}
return REQUEST;
};

@@ -1,4 +0,9 @@

var utils = require('./utils');
exports.getAuthHeaderObject = function(accountId, applicationKey) {
if (!accountId) {
throw new Error('Invalid accountId');
}
if (!applicationKey) {
throw new Error('Invalid applicationKey');
}
var base64 = new Buffer(accountId + ':' + applicationKey).toString('base64');

@@ -11,2 +16,8 @@ return {

exports.getAuthHeaderObjectWithToken = function(b2) {
if (!b2) {
throw new Error('Invalid B2 instance');
}
if (!b2.authorizationToken) {
throw new Error('Invalid authorizationToken');
}
return {

@@ -13,0 +24,0 @@ Authorization: b2.authorizationToken

{
"name": "backblaze-b2",
"version": "0.9.0",
"version": "0.9.1",
"description": "Node.js Library for the Backblaze B2 Storage Service",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -11,2 +11,9 @@ ### Backblaze B2 Node.js Library

### Status of project
At this time not all API features of Backblaze B2 are yet implemented.
Once all API features are implemented, version will be updated to 1.0.x
### Usage

@@ -13,0 +20,0 @@

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