Udostępnij za pośrednictwem


DeviceAuthenticationWithTokenRefresh Constructors

Definition

Overloads

DeviceAuthenticationWithTokenRefresh(String)

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

DeviceAuthenticationWithTokenRefresh(String, Int32, Int32)

Initializes a new instance of the DeviceAuthenticationWithTokenRefresh class.

DeviceAuthenticationWithTokenRefresh(String, Int32, Int32, Boolean)

Initializes a new instance of the DeviceAuthenticationWithTokenRefresh class.

DeviceAuthenticationWithTokenRefresh(String)

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

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

Parameters

deviceId
String

The device identifier.

Remarks

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

Applies to

DeviceAuthenticationWithTokenRefresh(String, Int32, Int32)

Initializes a new instance of the DeviceAuthenticationWithTokenRefresh class.

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

Parameters

deviceId
String

Device Identifier.

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 device client instance is disposed. To reuse the authentication method instance across multiple client instance lifetimes, use DeviceAuthenticationWithTokenRefresh(String, Int32, Int32, Boolean) constructor and set disposeWithClient to false.

Applies to

DeviceAuthenticationWithTokenRefresh(String, Int32, Int32, Boolean)

Initializes a new instance of the DeviceAuthenticationWithTokenRefresh class.

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

Parameters

deviceId
String

Device Identifier.

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