你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
AuthenticationMechanism Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. service. auth. AuthenticationMechanism
- com.
public class AuthenticationMechanism
Authentication mechanism, used to store the device symmetric key.
Constructor Summary
Constructor | Description |
---|---|
AuthenticationMechanism(AuthenticationType authenticationType) |
Constructor that is used for certificate authority authentication. |
AuthenticationMechanism(SymmetricKey symmetricKey) |
Constructor that saves a symmetric key used for SAS authentication |
AuthenticationMechanism(String primaryThumbprint, String secondaryThumbprint) |
Constructor that saves a thumbprint used for self signed authentication |
Method Summary
Modifier and Type | Method and Description |
---|---|
boolean | equals(Object other) |
Authentication |
getAuthenticationType()
Getter for authentication type. |
java.lang.String |
getPrimaryThumbprint()
Returns the primary thumbprint |
java.lang.String |
getSecondaryThumbprint()
Returns the secondary thumbprint |
Symmetric |
getSymmetricKey()
Getter for symmetric key. |
void |
setAuthenticationType(AuthenticationType type)
Setter for the authentication type of this object |
void |
setPrimaryThumbprint(String primaryThumbprint)
Setter for the primary thumbprint |
void |
setSecondaryThumbprint(String secondaryThumbprint)
Setter for the secondary thumbprint |
void |
setSymmetricKey(SymmetricKey symmetricKey)
Setter for symmetric key. |
Methods inherited from java.lang.Object
Constructor Details
AuthenticationMechanism
public AuthenticationMechanism(AuthenticationType authenticationType)
Constructor that is used for certificate authority authentication. Necessary keys will be generated automatically, and can be overwritten later as well.
Parameters:
AuthenticationMechanism
public AuthenticationMechanism(SymmetricKey symmetricKey)
Constructor that saves a symmetric key used for SAS authentication
Parameters:
Throws:
AuthenticationMechanism
public AuthenticationMechanism(String primaryThumbprint, String secondaryThumbprint)
Constructor that saves a thumbprint used for self signed authentication
Parameters:
Method Details
equals
public boolean equals(Object other)
Overrides:
AuthenticationMechanism.equals(Object other)Parameters:
getAuthenticationType
public AuthenticationType getAuthenticationType()
Getter for authentication type.
Returns:
getPrimaryThumbprint
public String getPrimaryThumbprint()
Returns the primary thumbprint
Returns:
null
getSecondaryThumbprint
public String getSecondaryThumbprint()
Returns the secondary thumbprint
Returns:
null
getSymmetricKey
public SymmetricKey getSymmetricKey()
Getter for symmetric key.
Returns:
setAuthenticationType
public void setAuthenticationType(AuthenticationType type)
Setter for the authentication type of this object
Parameters:
Throws:
setPrimaryThumbprint
public void setPrimaryThumbprint(String primaryThumbprint)
Setter for the primary thumbprint
Parameters:
setSecondaryThumbprint
public void setSecondaryThumbprint(String secondaryThumbprint)
Setter for the secondary thumbprint
Parameters:
setSymmetricKey
public void setSymmetricKey(SymmetricKey symmetricKey)
Setter for symmetric key.
Parameters:
Throws: