New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

azure-iot-http-base

Package Overview
Dependencies
Maintainers
7
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azure-iot-http-base - npm Package Compare versions

Comparing version 1.11.9 to 1.11.10

2

dist/rest_api_client.d.ts

@@ -55,3 +55,3 @@ import { SharedAccessSignature, X509 } from 'azure-iot-common';

* @method module:azure-iothub.RestApiClient.updateSharedAccessSignature
* @description Updates the shared access signature used to authentify API calls.
* @description Updates the shared access signature used to authenticate API calls.
*

@@ -58,0 +58,0 @@ * @param {string} sharedAccessSignature The new shared access signature that should be used.

@@ -59,3 +59,3 @@ // Copyright (c) Microsoft. All rights reserved.

function RestApiClient(config, userAgent, httpRequestBuilder) {
this._iotHubPublicScope = ['https://iothubs.azure.net/.default'];
this._iotHubPublicScope = 'https://iothubs.azure.net/.default';
this._BearerTokenPrefix = 'Bearer ';

@@ -122,11 +122,7 @@ this._MinutesBeforeProactiveRenewal = 9;

if (this._config.tokenCredential) {
var accessToken = this.getToken();
Promise.resolve(accessToken).then(function (value) {
if (value) {
httpHeaders.Authorization = value;
_this.executeBody(requestBody, httpHeaders, headers, method, path, timeout, requestOptions, done);
}
else {
throw new Error('AccessToken creation failed');
}
this.getToken().then(function (accessToken) {
httpHeaders.Authorization = accessToken;
_this.executeBody(requestBody, httpHeaders, headers, method, path, timeout, requestOptions, done);
}).catch(function (err) {
done(err);
});

@@ -143,3 +139,3 @@ }

* @method module:azure-iothub.RestApiClient.updateSharedAccessSignature
* @description Updates the shared access signature used to authentify API calls.
* @description Updates the shared access signature used to authenticate API calls.
*

@@ -173,3 +169,3 @@ * @param {string} sharedAccessSignature The new shared access signature that should be used.

RestApiClient.prototype.isAccessTokenCloseToExpiry = function (accessToken) {
var remainingTimeToLive = Date.now() - accessToken.expiresOnTimestamp;
var remainingTimeToLive = accessToken.expiresOnTimestamp - Date.now();
return remainingTimeToLive <= this._MillisecsBeforeProactiveRenewal;

@@ -196,9 +192,6 @@ };

case 2:
if (this._accessToken) {
return [2 /*return*/, this._BearerTokenPrefix + this._accessToken.token];
if (!this._accessToken) {
throw new Error('AccessToken creation failed');
}
else {
return [2 /*return*/, null];
}
return [2 /*return*/];
return [2 /*return*/, this._BearerTokenPrefix + this._accessToken.token];
}

@@ -312,3 +305,3 @@ });

- `response` shall contain the `IncomingMessage` object returned by the HTTP layer.
- `reponseBody` shall contain the content of the HTTP response.
- `responseBody` shall contain the content of the HTTP response.
- `message` shall contain a human-readable error message.]*/

@@ -315,0 +308,0 @@ var error;

{
"name": "azure-iot-http-base",
"version": "1.11.9",
"version": "1.11.10",
"description": "HTTP operations used by Azure IoT device and service SDKs",

@@ -10,3 +10,3 @@ "author": "Microsoft Corporation",

"dependencies": {
"azure-iot-common": "1.12.9",
"azure-iot-common": "1.12.10",
"debug": "^4.3.1",

@@ -21,3 +21,3 @@ "uuid": "^3.3.2"

"nyc": "^15.0.0",
"sinon": "^7.4.1",
"sinon": "^11.1.2",
"source-map-support": "^0.5.16",

@@ -24,0 +24,0 @@ "ts-node": "^8.6.2",

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