IotHubServiceSasToken Class

Definition

Grants device access to an IoT Hub for the specified amount of time.

public class IotHubServiceSasToken
Inheritance
java.lang.Object
IotHubServiceSasToken

Constructors

IotHubServiceSasToken(IotHubConnectionString iotHubConnectionString)

Constructor. Generates a SAS token that grants access to an IoT Hub for the specified amount of time. (1 year specified in TOKEN_VALID_SECS)

Fields

expiryTime
keyName
keyValue
resourceUri
token
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:SharedAccessSignature sr=IOTHUBURI&sig=SIGNATURE&se=EXPIRY&skn=SHAREDACCESSKEYNAME 

Methods

toString()

Returns the string representation of the SAS token.

Applies to