IotHubSasTokenSoftwareAuthenticationProvider Class
- java.
lang. Object - IotHubAuthenticationProvider
- IotHubSasTokenAuthenticationProvider
- com.
microsoft. azure. sdk. iot. device. auth. IotHubSasTokenSoftwareAuthenticationProvider
- com.
public class IotHubSasTokenSoftwareAuthenticationProvider extends IotHubSasTokenAuthenticationProvider
Constructor Summary
Constructor | Description |
---|---|
IotHubSasTokenSoftwareAuthenticationProvider(String hostname, String gatewayHostname, String deviceId, String moduleId, String deviceKey, String sharedAccessToken) |
Constructor that takes a connection string containing a sas token or a device key and uses the default token valid seconds and timeBufferPercentage |
IotHubSasTokenSoftwareAuthenticationProvider(String hostname, String gatewayHostname, String deviceId, String moduleId, String deviceKey, String sharedAccessToken, int tokenValidSecs, int timeBufferPercentage) |
Constructor that takes a connection string containing a sas token or a device key |
IotHubSasTokenSoftwareAuthenticationProvider(String hostname, String gatewayHostname, String deviceId, String moduleId, String deviceKey, String sharedAccessToken, SSLContext sslContext) |
Constructor that takes a connection string containing a sas token or a device key and uses the default token valid seconds and timeBufferPercentage |
Method Summary
Modifier and Type | Method and Description |
---|---|
boolean | canRefreshToken() |
char [] |
getSasToken()
Getter for SasToken. If the saved token has expired, this method shall renew it if possible |
boolean |
isAuthenticationProviderRenewalNecessary()
Returns true if the saved sas token has expired and cannot be auto-renewed through the device key |
void | setTokenValidSecs(long tokenValidSecs) |
Inherited Members
Constructor Details
IotHubSasTokenSoftwareAuthenticationProvider
public IotHubSasTokenSoftwareAuthenticationProvider(String hostname, String gatewayHostname, String deviceId, String moduleId, String deviceKey, String sharedAccessToken)
Constructor that takes a connection string containing a sas token or a device key and uses the default token valid seconds and timeBufferPercentage
Parameters:
IotHubSasTokenSoftwareAuthenticationProvider
public IotHubSasTokenSoftwareAuthenticationProvider(String hostname, String gatewayHostname, String deviceId, String moduleId, String deviceKey, String sharedAccessToken, int tokenValidSecs, int timeBufferPercentage)
Constructor that takes a connection string containing a sas token or a device key
Parameters:
IotHubSasTokenSoftwareAuthenticationProvider
public IotHubSasTokenSoftwareAuthenticationProvider(String hostname, String gatewayHostname, String deviceId, String moduleId, String deviceKey, String sharedAccessToken, SSLContext sslContext)
Constructor that takes a connection string containing a sas token or a device key and uses the default token valid seconds and timeBufferPercentage
Parameters:
Method Details
canRefreshToken
public boolean canRefreshToken()
getSasToken
public char [] getSasToken()
Getter for SasToken. If the saved token has expired, this method shall renew it if possible
Returns:
isAuthenticationProviderRenewalNecessary
public boolean isAuthenticationProviderRenewalNecessary()
Returns true if the saved sas token has expired and cannot be auto-renewed through the device key
Returns:
setTokenValidSecs
public void setTokenValidSecs(long tokenValidSecs)
Parameters:
Applies to
Azure SDK for Java