public class IotHubSasTokenHardwareAuthenticationProvider extends IotHubSasTokenAuthenticationProvider
sasToken, tokenValidSecsdeviceId, gatewayHostname, hostname, moduleId| Constructor and Description |
|---|
IotHubSasTokenHardwareAuthenticationProvider(java.lang.String hostname,
java.lang.String gatewayHostname,
java.lang.String deviceId,
java.lang.String moduleId,
com.microsoft.azure.sdk.iot.provisioning.security.SecurityProvider securityProvider)
Creates a Sas Token based authentication object that uses the provided security provider to produce sas tokens.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRefreshToken() |
char[] |
getSasToken()
Getter for SasToken.
|
boolean |
isAuthenticationProviderRenewalNecessary()
Returns true if the this authentication provider is no longer valid.
|
getMillisecondsBeforeProactiveRenewal, getTokenValidSecs, isSasTokenExpired, setTokenValidSecs, shouldRefreshTokengetDeviceId, getGatewayHostname, getHostname, getModuleId, getSSLContextpublic IotHubSasTokenHardwareAuthenticationProvider(java.lang.String hostname,
java.lang.String gatewayHostname,
java.lang.String deviceId,
java.lang.String moduleId,
com.microsoft.azure.sdk.iot.provisioning.security.SecurityProvider securityProvider)
throws java.io.IOException
hostname - The host name of the hub to authenticate againstgatewayHostname - The gateway hostname to use, or null if connecting to an IotHubdeviceId - The unique id of the device to authenticatemoduleId - the module id. May be null if not using a modulesecurityProvider - the security provider to use for authenticationjava.io.IOException - if the provided securityProvider throws while retrieving a sas token or ssl context instancepublic char[] getSasToken()
throws java.io.IOException
getSasToken in class IotHubSasTokenAuthenticationProviderjava.io.IOException - if generating the sas token from the TPM failspublic boolean canRefreshToken()
canRefreshToken in class IotHubSasTokenAuthenticationProviderpublic boolean isAuthenticationProviderRenewalNecessary()
IotHubSasTokenAuthenticationProviderisAuthenticationProviderRenewalNecessary in class IotHubSasTokenAuthenticationProviderCopyright © 2023. All rights reserved.