🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

azure-sas

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azure-sas

Azure Shared Access Signature generation.

0.0.1
latest
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

azure-sas

Azure Shared Access Signature Signing (for node.js).

The goal is to provide a way to grant access keys to your azure resources (like querying a table from the browser) with a very small footprint.

Usage

The tests are written in an end-to-end style see them for actual usage (making calls to azure)

var sas = require('azure-sas');

var expires = new Date();
// good for an hour
expires.setHours(expires.getHours() + 1);

// sign a table resource
var queryParams = sas.table({
  // this must be lowercase even if your table is uppercase, etc...
  resource: 'tablename',

  // allow reads
  signedpermissions: 'r',

  signedexpiry: expires
});

// query params is suitable for use in any table query that is supported
// via reads

// a quick example using superagent

var superagent = require('superagent');

superagent.get('https://mytable.table.core.windows.net/mytable()').
  query('$filter', '(PartitionKey eq "mypartition")').
  // turn on json mode
  set('Accept', 'application/json');
  end(function(err, result) {
    var json = result.res.body;
  });

Keywords

azure

FAQs

Package last updated on 12 Feb 2014

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