IotHubServiceSasToken Class
Definition
- java.lang.Object
- com.microsoft.azure.sdk.iot.service.auth.IotHubServiceSasToken
Grants device access to an IoT Hub for the specified amount of time.
public final class IotHubServiceSasToken
Constructors
| IotHubServiceSasToken(IotHubConnectionString iotHubConnectionString) |
Constructor. Generates a SAS token that grants access to an IoT Hub for the default amount of time of 1 hour. |
| IotHubServiceSasToken(IotHubConnectionString iotHubConnectionString, long tokenLifespanSeconds) |
Constructor. Generates a SAS token that grants access to an IoT Hub for the specified amount of time. |
Fields
| TOKEN_FORMAT |
The SAS token format. The parameters to be interpolated are, in order: the signature the resource URI the expiry time the key name Example: |
| expiryTimeSeconds | |
| keyName | |
| keyValue | |
| resourceUri | |
| token | |
| tokenLifespanSeconds | |
Methods
| getExpiryTimeMillis() | |
| getTokenLifespanSeconds() | |
| toString() |
Returns the string representation of the SAS token. |
Inherited Members
java.lang.Object.clone()
java.lang.Object.equals(java.lang.Object)
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.hashCode()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.toString()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)