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, String, SasTokenProvider, IotHubClientProtocol, ClientOptions)sasToken, tokenValidSecsdeviceId, gatewayHostname, hostname, moduleId| Constructor and Description |
|---|
IotHubSasTokenProvidedAuthenticationProvider(java.lang.String hostName,
java.lang.String deviceId,
java.lang.String moduleId,
SasTokenProvider sasTokenProvider,
javax.net.ssl.SSLContext sslContext) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRefreshToken() |
int |
getMillisecondsBeforeProactiveRenewal() |
char[] |
getSasToken() |
boolean |
isAuthenticationProviderRenewalNecessary()
Returns true if the this authentication provider is no longer valid.
|
boolean |
isSasTokenExpired() |
void |
setTokenValidSecs(long tokenValidSecs) |
getTokenValidSecs, shouldRefreshTokengetDeviceId, getGatewayHostname, getHostname, getModuleId, getSSLContextpublic IotHubSasTokenProvidedAuthenticationProvider(java.lang.String hostName,
java.lang.String deviceId,
java.lang.String moduleId,
SasTokenProvider sasTokenProvider,
javax.net.ssl.SSLContext sslContext)
public boolean isAuthenticationProviderRenewalNecessary()
IotHubSasTokenAuthenticationProviderisAuthenticationProviderRenewalNecessary in class IotHubSasTokenAuthenticationProviderpublic void setTokenValidSecs(long tokenValidSecs)
setTokenValidSecs in class IotHubSasTokenAuthenticationProviderpublic boolean canRefreshToken()
canRefreshToken in class IotHubSasTokenAuthenticationProviderpublic char[] getSasToken()
getSasToken in class IotHubSasTokenAuthenticationProviderpublic int getMillisecondsBeforeProactiveRenewal()
getMillisecondsBeforeProactiveRenewal in class IotHubSasTokenAuthenticationProviderpublic boolean isSasTokenExpired()
isSasTokenExpired in class IotHubSasTokenAuthenticationProviderCopyright © 2023. All rights reserved.