Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
@warerebel/azurerestauth
Advanced tools
Readme
Node module to generate Azure shared key authorization strings for using the REST API.
Call the constructor with the storage account name and the shared key that will be used to sign requests to the REST API.
Call getAuthHeaderValue
with the http request options and the Authorization
header value will be returned.
const azureRestAuth = require("@warerebel/azurerestauth");
let myAzureRestAuth = new azureRestAuth.AzureSign("account name", "Shared key");
let httpOptions = {
method: "GET",
protocol: "https:",
host: "testsite.blob.core.windows.net",
path: "/container01/tmp.txt",
headers: {
"x-ms-version": "2015-07-08",
"x-ms-client-request-id": "9251fa41-0ca4-4558-84ac-44ab027b8f1e",
"x-ms-date": "Tue, 05 Jul 2016 06:48:26 GMT"
},
}
let authString = myAzureRestAuth.getAuthHeaderValue(httpOptions);
httpOptions.headers.Authorization = authString;
import {AzureSign, HttpOptions} from "@warerebel/azurerestauth";
let myAzureRestAuth = new AzureSign("account name", "Shared key");
let httpOptions: HttpOptions = {
method: "GET",
protocol: "https:",
host: "testsite.blob.core.windows.net",
path: "/container01/tmp.txt",
headers: {
"x-ms-version": "2015-07-08",
"x-ms-client-request-id": "9251fa41-0ca4-4558-84ac-44ab027b8f1e",
"x-ms-date": "Tue, 05 Jul 2016 06:48:26 GMT"
},
}
let authString = myAzureRestAuth.getAuthHeaderValue(httpOptions);
if(!httpOptions.headers)
httpOptions.headers = {};
httpOptions.headers.Authorization = authString;
Install dependencies with:
npm install
Run tests with:
npm test
Generate coverage with:
npm run coverage
Compatible with Azure REST API versions 2014-02-14 and later
FAQs
Node module to provide Azure REST API shared key authorization headers
The npm package @warerebel/azurerestauth receives a total of 0 weekly downloads. As such, @warerebel/azurerestauth popularity was classified as not popular.
We found that @warerebel/azurerestauth demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.