IotHubSasTokenProvidedAuthenticationProvider Class
- java.
lang. Object - IotHubAuthenticationProvider
- IotHubSasTokenAuthenticationProvider
- com.
microsoft. azure. sdk. iot. device. auth. IotHubSasTokenProvidedAuthenticationProvider
- com.
public class IotHubSasTokenProvidedAuthenticationProvider extends IotHubSasTokenAuthenticationProvider
IotHubSasTokenAuthenticationProvider implementation where the tokens are provided by an instance of SasTokenProvider. This is used in cases like when the user creates a device client with DeviceClient(String hostName, String deviceId, SasTokenProvider sasTokenProvider, IotHubClientProtocol protocol, ClientOptions clientOptions)
Constructor Summary
Constructor | Description | |
---|---|---|
IotHubSasTokenProvidedAuthenticationProvider(String hostName, String deviceId, String moduleId, SasTokenProvider sasTokenProvider, SSLContext sslContext) |
Method Summary
Modifier and Type | Method and Description |
---|---|
boolean | canRefreshToken() |
int | getMillisecondsBeforeProactiveRenewal() |
char [] | getSasToken() |
boolean | isAuthenticationProviderRenewalNecessary() |
boolean | isSasTokenExpired() |
void | setTokenValidSecs(long tokenValidSecs) |
Inherited Members
Constructor Details
IotHubSasTokenProvidedAuthenticationProvider
public IotHubSasTokenProvidedAuthenticationProvider(String hostName, String deviceId, String moduleId, SasTokenProvider sasTokenProvider, SSLContext sslContext)
Parameters:
Method Details
canRefreshToken
public boolean canRefreshToken()
getMillisecondsBeforeProactiveRenewal
public int getMillisecondsBeforeProactiveRenewal()
getSasToken
public char [] getSasToken()
isAuthenticationProviderRenewalNecessary
public boolean isAuthenticationProviderRenewalNecessary()
isSasTokenExpired
public boolean isSasTokenExpired()
setTokenValidSecs
public void setTokenValidSecs(long tokenValidSecs)
Parameters:
Applies to
Azure SDK for Java