IotHubServiceSasToken Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. service. auth. IotHubServiceSasToken
- com.
public class IotHubServiceSasToken
Grants device access to an IoT Hub for the specified amount of time.
Constructor Summary
Constructor | Description |
---|---|
IotHubServiceSasToken(IotHubConnectionString iotHubConnectionString) |
Constructor. Generates a SAS token that grants access to an IoT Hub for the default amount of time of 1 hour. |
Method Summary
Modifier and Type | Method and Description |
---|---|
final long | getExpiryTimeMillis() |
long | getTokenLifespanSeconds() |
String |
toString()
Returns the string representation of the SAS token. |
Constructor Details
IotHubServiceSasToken
public IotHubServiceSasToken(IotHubConnectionString iotHubConnectionString)
Constructor. Generates a SAS token that grants access to an IoT Hub for the default amount of time of 1 hour.
Parameters:
Method Details
getExpiryTimeMillis
public final long getExpiryTimeMillis()
Returns:
getTokenLifespanSeconds
public long getTokenLifespanSeconds()
Returns:
toString
public String toString()
Returns the string representation of the SAS token.
Returns:
Applies to
Azure SDK for Java