Condividi tramite


ModuleAuthenticationWithTokenRefresh Constructors

Definition

Overloads

ModuleAuthenticationWithTokenRefresh(String, String)

Initializes a new instance of this class using default TTL and TTL buffer time settings.

ModuleAuthenticationWithTokenRefresh(String, String, Int32, Int32)

Initializes a new instance of this class.

ModuleAuthenticationWithTokenRefresh(String, String, Int32, Int32, Boolean)

Initializes a new instance of this class.

ModuleAuthenticationWithTokenRefresh(String, String)

Initializes a new instance of this class using default TTL and TTL buffer time settings.

public ModuleAuthenticationWithTokenRefresh (string deviceId, string moduleId);
new Microsoft.Azure.Devices.Client.ModuleAuthenticationWithTokenRefresh : string * string -> Microsoft.Azure.Devices.Client.ModuleAuthenticationWithTokenRefresh
Public Sub New (deviceId As String, moduleId As String)

Parameters

deviceId
String

The Id of the device.

moduleId
String

The Id of the module.

Remarks

This constructor will create an authentication method instance that will be disposed when its associated module client instance is disposed. To reuse the authentication method instance across multiple client instance lifetimes, use the ModuleAuthenticationWithTokenRefresh(String, String, Int32, Int32, Boolean) constructor and set disposeWithClient to false.

Applies to

ModuleAuthenticationWithTokenRefresh(String, String, Int32, Int32)

Initializes a new instance of this class.

public ModuleAuthenticationWithTokenRefresh (string deviceId, string moduleId, int suggestedTimeToLiveSeconds, int timeBufferPercentage);
new Microsoft.Azure.Devices.Client.ModuleAuthenticationWithTokenRefresh : string * string * int * int -> Microsoft.Azure.Devices.Client.ModuleAuthenticationWithTokenRefresh
Public Sub New (deviceId As String, moduleId As String, suggestedTimeToLiveSeconds As Integer, timeBufferPercentage As Integer)

Parameters

deviceId
String

The device Id.

moduleId
String

The module Id.

suggestedTimeToLiveSeconds
Int32

The suggested time to live value for the generated SAS tokens. The default value is 1 hour.

timeBufferPercentage
Int32

The time buffer before expiry when the token should be renewed, expressed as a percentage of the time to live. The default behavior is that the token will be renewed when it has 15% or less of its lifespan left.

Remarks

This constructor will create an authentication method instance that will be disposed when its associated module client instance is disposed. To reuse the authentication method instance across multiple client instance lifetimes, use the ModuleAuthenticationWithTokenRefresh(String, String, Int32, Int32, Boolean) constructor and set disposeWithClient to false.

Applies to

ModuleAuthenticationWithTokenRefresh(String, String, Int32, Int32, Boolean)

Initializes a new instance of this class.

public ModuleAuthenticationWithTokenRefresh (string deviceId, string moduleId, int suggestedTimeToLiveSeconds, int timeBufferPercentage, bool disposeWithClient);
new Microsoft.Azure.Devices.Client.ModuleAuthenticationWithTokenRefresh : string * string * int * int * bool -> Microsoft.Azure.Devices.Client.ModuleAuthenticationWithTokenRefresh
Public Sub New (deviceId As String, moduleId As String, suggestedTimeToLiveSeconds As Integer, timeBufferPercentage As Integer, disposeWithClient As Boolean)

Parameters

deviceId
String

The device Id.

moduleId
String

The module Id.

suggestedTimeToLiveSeconds
Int32

The suggested time to live value for the generated SAS tokens. The default value is 1 hour.

timeBufferPercentage
Int32

The time buffer before expiry when the token should be renewed, expressed as a percentage of the time to live. The default behavior is that the token will be renewed when it has 15% or less of its lifespan left.

disposeWithClient
Boolean

Applies to