ServiceAuthenticationWithSharedAccessPolicyKey Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. service. AuthenticationMethod - com.
microsoft. azure. sdk. iot. service. ServiceAuthenticationWithSharedAccessPolicyKey
- com.
- com.
public class ServiceAuthenticationWithSharedAccessPolicyKey
extends AuthenticationMethod
Extend AuthenticationMethod class, provide getters for protected properties and implement populate function to set ServiceAuthenticationWithSharedAccessPolicyKey type policy on given IotHubConnectionString object.
Constructor Summary
Constructor | Description |
---|---|
ServiceAuthenticationWithSharedAccessPolicyKey(String policyName, String key) |
Constructor to create instance from policy name and policy key |
Method Summary
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getKey()
Getter for policy key |
java.lang.String |
getPolicyName()
Getter for policy name |
protected
Iot |
populate(IotHubConnectionString iotHubConnectionString)
Populate given Iot |
protected void |
setKey(String key)
Setter for policy key |
protected void |
setPolicyName(String policyName)
Setter for policy name |
Methods inherited from AuthenticationMethod
Methods inherited from java.lang.Object
Constructor Details
ServiceAuthenticationWithSharedAccessPolicyKey
public ServiceAuthenticationWithSharedAccessPolicyKey(String policyName, String key)
Constructor to create instance from policy name and policy key
Parameters:
Method Details
getKey
public String getKey()
Getter for policy key
Returns:
getPolicyName
public String getPolicyName()
Getter for policy name
Returns:
populate
protected IotHubConnectionString populate(IotHubConnectionString iotHubConnectionString)
Populate given IotHubConnectionString with proper policy key authentication data
Overrides:
ServiceAuthenticationWithSharedAccessPolicyKey.populate(IotHubConnectionString iotHubConnectionString)Parameters:
Returns:
setKey
protected void setKey(String key)
Setter for policy key
Parameters:
setPolicyName
protected void setPolicyName(String policyName)
Setter for policy name
Parameters: