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