你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
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: