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. Necessary keys will be generated automatically, and can be overwritten later as well. |
AuthenticationMechanism(String primaryThumbprint, String secondaryThumbprint) |
Constructor that saves a thumbprint used for self signed authentication |
AuthenticationMechanism(SymmetricKey symmetricKey) |
Constructor that saves a symmetric key used for SAS authentication |
Method Summary
Modifier and Type | Method and Description |
---|---|
Authentication |
getAuthenticationType()
Getter for authentication type. |
String |
getPrimaryThumbprint()
Returns the primary thumbprint |
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. |
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(String primaryThumbprint, String secondaryThumbprint)
Constructor that saves a thumbprint used for self signed authentication
Parameters:
AuthenticationMechanism
public AuthenticationMechanism(SymmetricKey symmetricKey)
Constructor that saves a symmetric key used for SAS authentication
Parameters:
Method Details
getAuthenticationType
public AuthenticationType getAuthenticationType()
Getter for authentication type.
Returns:
getPrimaryThumbprint
public String getPrimaryThumbprint()
Returns the primary thumbprint
Returns:
the primary thumbprint. It may benull
</code></p>
getSecondaryThumbprint
public String getSecondaryThumbprint()
Returns the secondary thumbprint
Returns:
the secondary thumbprint. It may benull
</code></p>
getSymmetricKey
public SymmetricKey getSymmetricKey()
Getter for symmetric key.
Returns:
The symmetric key.
setAuthenticationType
public void setAuthenticationType(AuthenticationType type)
Setter for the authentication type of this object
Parameters:
type
- the type of authentication to set
setPrimaryThumbprint
public void setPrimaryThumbprint(String primaryThumbprint)
Setter for the primary thumbprint
Parameters:
primaryThumbprint
- the value to set
setSecondaryThumbprint
public void setSecondaryThumbprint(String secondaryThumbprint)
Setter for the secondary thumbprint
Parameters:
secondaryThumbprint
- the value to set
setSymmetricKey
public void setSymmetricKey(SymmetricKey symmetricKey)
Setter for symmetric key.
Parameters:
symmetricKey
- the symmetric key to set
Applies to
Azure SDK for Java