IotHubAuthenticationProvider Class

  • java.lang.Object
    • com.microsoft.azure.sdk.iot.device.auth.IotHubAuthenticationProvider

public class IotHubAuthenticationProvider

Base class for providing authentication for a Device Client or Module Client, including x509 and SAS based authentication.

Field Summary

Modifier and Type Field and Description
String deviceId
final String gatewayHostname
String hostname
final String moduleId

Constructor Summary

Constructor Description
IotHubAuthenticationProvider(String hostname, String gatewayHostname, String deviceId, String moduleId)
IotHubAuthenticationProvider(String hostname, String gatewayHostname, String deviceId, String moduleId, SSLContext sslContext)

Method Summary

Modifier and Type Method and Description
String getDeviceId()

Get the deviceId

String getGatewayHostname()

Get the gatewayHostname

String getHostname()

Get the hostname

String getModuleId()

Get the module id

SSLContext getSSLContext()

Field Details

deviceId

protected String deviceId

gatewayHostname

protected final String gatewayHostname

hostname

protected String hostname

moduleId

protected final String moduleId

Constructor Details

IotHubAuthenticationProvider

public IotHubAuthenticationProvider(String hostname, String gatewayHostname, String deviceId, String moduleId)

Parameters:

hostname
gatewayHostname
deviceId
moduleId

IotHubAuthenticationProvider

public IotHubAuthenticationProvider(String hostname, String gatewayHostname, String deviceId, String moduleId, SSLContext sslContext)

Parameters:

hostname
gatewayHostname
deviceId
moduleId
sslContext

Method Details

getDeviceId

public String getDeviceId()

Get the deviceId

Returns:

the saved deviceId

getGatewayHostname

public String getGatewayHostname()

Get the gatewayHostname

Returns:

the saved gatewayHostname

getHostname

public String getHostname()

Get the hostname

Returns:

the saved hostname

getModuleId

public String getModuleId()

Get the module id

Returns:

the saved module id

getSSLContext

public SSLContext getSSLContext()

Applies to