Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

azure-iot-common

Package Overview
Dependencies
Maintainers
3
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azure-iot-common - npm Package Compare versions

Comparing version 1.2.2 to 1.3.0

lib/authentication_provider.d.ts

18

common.d.ts

@@ -16,13 +16,4 @@ // Copyright (c) Microsoft. All rights reserved.

export { RetryPolicy, NoRetry, ExponentialBackOffWithJitter } from './lib/retry_policy';
export { AuthenticationProvider, AuthenticationType } from './lib/authentication_provider';
// Typescript only, used by other modules in azure-iot-sdk
export interface X509 {
// https://nodejs.org/api/tls.html#tls_tls_connect_options_callback
cert?: string | string[] | Buffer | Buffer[];
key?: string | Buffer;
passphrase?: string;
certFile?: string;
keyFile?: string;
}
export interface Receiver extends EventEmitter {

@@ -35,7 +26,2 @@ on(type: 'message', func: (msg: Message) => void): this;

export interface TransportConfig {
host: string;
deviceId: string;
sharedAccessSignature?: string;
x509?: X509;
}
export { TransportConfig, X509 } from './lib/authorization';

@@ -25,2 +25,4 @@ // Copyright (c) Microsoft. All rights reserved.

ExponentialBackOffWithJitter: require('./lib/retry_policy.js').ExponentialBackOffWithJitter,
AuthenticationProvider: require('./lib/authentication_provider').X509AuthenticationProvider,
AuthenticationType: require('./lib/authentication_provider').AuthenticationType
};

@@ -0,1 +1,2 @@

/// <reference types="node" />
/*! Copyright (c) Microsoft. All rights reserved.

@@ -13,1 +14,59 @@ *! Licensed under the MIT license. See LICENSE file in the project root for full license information.

export declare function hmacHash(password: string, stringToSign: string): string;
/**
* Configuration structure used by transports and `AuthenticationProvider` objects to store and exchange credentials.
*
*/
export interface TransportConfig {
/**
* Hostname of the Azure IoT hub instance.
*/
host: string;
/**
* Device unique identifier.
*/
deviceId: string;
/**
* Shared access signature security token used to authenticate a device when token-based authentication is used.
*/
sharedAccessSignature?: string;
/**
* Name of the policy which shared access key is used to sign security tokens.
*/
sharedAccessKeyName?: string;
/**
* Shared access key is used to sign security tokens.
*/
sharedAccessKey?: string;
/**
* Object containing the certificate and key used by the device to connect and authenticate with the Azure IoT hub instance.
*/
x509?: X509;
}
/**
* Object used to store an X509 certificate and key for transports to use.
*
* This is passed directly down to the low-level objects used by Node.js to connect the TLS socket.
* https://nodejs.org/api/tls.html#tls_tls_connect_options_callback
*/
export interface X509 {
/**
* X509 Certificate.
*/
cert?: string | string[] | Buffer | Buffer[];
/**
* Key associated with the X509 certificate.
*/
key?: string | Buffer;
/**
* Passphrase used to decode the key associated with the X509 certificate.
*/
passphrase?: string;
/**
* @private
*/
certFile?: string;
/**
* @private
*/
keyFile?: string;
}

@@ -243,3 +243,3 @@ /// <reference types="node" />

/**
* Error thrown when ant operation (local or remote) is cancelled
* Error thrown when any operation (local or remote) is cancelled
*

@@ -251,1 +251,9 @@ * @augments {Error}

}
/**
* Error thrown when a DPS registration operation fails
*
* @augments {Error}
*/
export declare class DeviceRegistrationFailedError extends Error {
constructor(message?: string);
}

@@ -477,3 +477,3 @@ /*! Copyright (c) Microsoft. All rights reserved.

/**
* Error thrown when ant operation (local or remote) is cancelled
* Error thrown when any operation (local or remote) is cancelled
*

@@ -493,2 +493,18 @@ * @augments {Error}

exports.OperationCancelledError = OperationCancelledError;
/**
* Error thrown when a DPS registration operation fails
*
* @augments {Error}
*/
var DeviceRegistrationFailedError = (function (_super) {
__extends(DeviceRegistrationFailedError, _super);
function DeviceRegistrationFailedError(message) {
_super.call(this, message);
this.name = 'ProvisioningRegistrationFailedError';
this.message = message;
Error.captureStackTrace(this, this.constructor);
}
return DeviceRegistrationFailedError;
}(Error));
exports.DeviceRegistrationFailedError = DeviceRegistrationFailedError;
//# sourceMappingURL=errors.js.map
{
"name": "azure-iot-common",
"version": "1.2.2",
"version": "1.3.0",
"description": "Common components shared by Azure IoT device and service SDKs",

@@ -5,0 +5,0 @@ "author": "Microsoft Corporation",

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