Share via


IotHubSasTokenProvidedAuthenticationProvider Class

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)

Inherited Members

Constructor Details

IotHubSasTokenProvidedAuthenticationProvider

public IotHubSasTokenProvidedAuthenticationProvider(String hostName, String deviceId, String moduleId, SasTokenProvider sasTokenProvider, SSLContext sslContext)

Parameters:

hostName
deviceId
moduleId
sasTokenProvider
sslContext

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:

tokenValidSecs

Applies to