26 строки
2.6 KiB
YAML
26 строки
2.6 KiB
YAML
### YamlMime:JavaType
|
|
uid: "com.microsoft.azure.sdk.iot.device.SasTokenProvider"
|
|
fullName: "com.microsoft.azure.sdk.iot.device.SasTokenProvider"
|
|
name: "SasTokenProvider"
|
|
nameWithType: "SasTokenProvider"
|
|
summary: "Interface for allowing users to control SAS token generation."
|
|
syntax: "public interface **SasTokenProvider**"
|
|
methods:
|
|
- uid: "com.microsoft.azure.sdk.iot.device.SasTokenProvider.getSasToken()"
|
|
fullName: "com.microsoft.azure.sdk.iot.device.SasTokenProvider.getSasToken()"
|
|
name: "getSasToken()"
|
|
nameWithType: "SasTokenProvider.getSasToken()"
|
|
summary: "Returns a SAS token to be used for authentication."
|
|
modifiers:
|
|
- "abstract"
|
|
syntax: "public abstract char[] getSasToken()"
|
|
desc: "Returns a SAS token to be used for authentication.\n\nThis function will be called each time the client library needs a SAS token. This will follow different patterns based on which protocol your client object is using.\n\nFor HTTPS, this function will be called for each HTTPS request made (for instance, once per telemetry send), and does not need to be a unique token each time. Because of that, users may simply cache and return the same SAS token repeatedly here. Alternatively, users can generate very short-lived SAS tokens since they will only need to be valid for a relative short period of time. The user of this API is responsible for tracking when to renew the SAS token based on how long the previous token was valid for.\n\nFor AMQPS/AMQPS\\_WS, this function will be called once when first opening the connection, and then will be called again at some point prior to the previous SAS token's expiry time in order to proactively renew the connection's authentication. This proactive renewal takes place at around 85% of the previous SAS token's lifespan.\n\nFor MQTT/MQTT\\_WS, this function will be called once when first opening the connection, and again each time the previous SAS token has expired and the client closes and re-opens the connection. MQTT/MQTT\\_WS does not currently support proactive token renewal."
|
|
returns:
|
|
description: "a SAS token to be used for authentication."
|
|
type: "<xref href=\"char?alt=char&text=char\" data-throw-if-not-resolved=\"False\" />[]"
|
|
type: "interface"
|
|
desc: "Interface for allowing users to control SAS token generation. To see an example of how SAS tokens can be generated from device connection strings, see <xref uid=\"com.microsoft.azure.sdk.iot.device.auth.IotHubSasToken\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.microsoft.azure.sdk.iot.device.auth.IotHubSasToken\"></xref>."
|
|
metadata: {}
|
|
package: "com.microsoft.azure.sdk.iot.device"
|
|
artifact: com.microsoft.azure.sdk.iot:iot-device-client:1.30.1
|