azure-iot-http-base
Advanced tools
Comparing version 1.11.12 to 1.11.13
@@ -27,3 +27,2 @@ import { SharedAccessSignature, X509 } from 'azure-iot-common'; | ||
export declare class RestApiClient { | ||
private _iotHubPublicScope; | ||
private _BearerTokenPrefix; | ||
@@ -102,4 +101,5 @@ private _MinutesBeforeProactiveRenewal; | ||
tokenCredential?: TokenCredential; | ||
tokenScope?: string | string[]; | ||
} | ||
type ResponseCallback = (err: Error, responseBody?: any, response?: any) => void; | ||
} |
@@ -59,3 +59,2 @@ // Copyright (c) Microsoft. All rights reserved. | ||
function RestApiClient(config, userAgent, httpRequestBuilder) { | ||
this._iotHubPublicScope = 'https://iothubs.azure.net/.default'; | ||
this._BearerTokenPrefix = 'Bearer '; | ||
@@ -73,2 +72,4 @@ this._MinutesBeforeProactiveRenewal = 9; | ||
throw new ReferenceError('userAgent cannot be \'' + userAgent + '\''); | ||
if (config.tokenCredential && !config.tokenScope) | ||
throw new azure_iot_common_1.errors.ArgumentError('config.tokenScope must be defined if config.tokenCredential is defined'); | ||
this._config = config; | ||
@@ -185,3 +186,3 @@ this._userAgent = userAgent; | ||
_a = this; | ||
return [4 /*yield*/, this._config.tokenCredential.getToken(this._iotHubPublicScope)]; | ||
return [4 /*yield*/, this._config.tokenCredential.getToken(this._config.tokenScope)]; | ||
case 1: | ||
@@ -188,0 +189,0 @@ _a._accessToken = (_b.sent()); |
{ | ||
"name": "azure-iot-http-base", | ||
"version": "1.11.12", | ||
"version": "1.11.13", | ||
"description": "HTTP operations used by Azure IoT device and service SDKs", | ||
@@ -11,3 +11,3 @@ "author": "Microsoft Corporation", | ||
"debug": "^4.3.1", | ||
"azure-iot-common": "1.12.12", | ||
"azure-iot-common": "1.12.13", | ||
"uuid": "^8.3.2" | ||
@@ -14,0 +14,0 @@ }, |
50926
836
+ Addedazure-iot-common@1.12.13(transitive)
- Removedazure-iot-common@1.12.12(transitive)
Updatedazure-iot-common@1.12.13