IotHubSasTokenAuthenticationProvider 类
定义
public class IotHubSasTokenAuthenticationProvider extends IotHubAuthenticationProvider
- 继承
继承成员
构造函数
字段
ENCODING_FORMAT_NAME | |
MILLISECONDS_PER_SECOND | |
MINIMUM_EXPIRATION_TIME_OFFSET | |
sasToken | |
timeBufferPercentage |
The percentage of a sas token's life that will happen before it should be renewed. Between 1 and 100 |
tokenValidSecs |
The number of seconds after which the generated SAS token for a message will become invalid. We also use the expiry time, which is computed as |
方法
canRefreshToken() | |
getMillisecondsBeforeProactiveRenewal() | |
getSasToken() | |
getTokenValidSecs() | |
isAuthenticationProviderRenewalNecessary() |
Returns true if the this authentication provider is no longer valid. If true, users will need to create a new DeviceClient instance to get a new authentication provider. The most common case for this is if the user provides a SAS token, but no symmetric key, and that SAS token has expired. At that point, the user's client won't be able to authenticate anymore. |
setTokenValidSecs(long tokenValidSecs) | |
shouldRefreshToken(boolean proactivelyRenew) |
Returns true if the saved token should be refreshed
|