Class UserAuthentication
java.lang.Object
com.azure.resourcemanager.deviceregistry.models.UserAuthentication
Definition of the client authentication mechanism to the server.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionmode()
Get the mode property: Defines the mode to authenticate the user of the client at the server.Get the usernamePasswordCredentials property: Defines the username and password references when UsernamePassword user authentication mode is selected.void
validate()
Validates the instance.Set the mode property: Defines the mode to authenticate the user of the client at the server.withUsernamePasswordCredentials
(UsernamePasswordCredentials usernamePasswordCredentials) Set the usernamePasswordCredentials property: Defines the username and password references when UsernamePassword user authentication mode is selected.withX509Credentials
(X509Credentials x509Credentials) Set the x509Credentials property: Defines the certificate reference when Certificate user authentication mode is selected.Get the x509Credentials property: Defines the certificate reference when Certificate user authentication mode is selected.
-
Constructor Details
-
UserAuthentication
public UserAuthentication()Creates an instance of UserAuthentication class.
-
-
Method Details
-
mode
Get the mode property: Defines the mode to authenticate the user of the client at the server.- Returns:
- the mode value.
-
withMode
Set the mode property: Defines the mode to authenticate the user of the client at the server.- Parameters:
mode
- the mode value to set.- Returns:
- the UserAuthentication object itself.
-
usernamePasswordCredentials
Get the usernamePasswordCredentials property: Defines the username and password references when UsernamePassword user authentication mode is selected.- Returns:
- the usernamePasswordCredentials value.
-
withUsernamePasswordCredentials
public UserAuthentication withUsernamePasswordCredentials(UsernamePasswordCredentials usernamePasswordCredentials) Set the usernamePasswordCredentials property: Defines the username and password references when UsernamePassword user authentication mode is selected.- Parameters:
usernamePasswordCredentials
- the usernamePasswordCredentials value to set.- Returns:
- the UserAuthentication object itself.
-
x509Credentials
Get the x509Credentials property: Defines the certificate reference when Certificate user authentication mode is selected.- Returns:
- the x509Credentials value.
-
withX509Credentials
Set the x509Credentials property: Defines the certificate reference when Certificate user authentication mode is selected.- Parameters:
x509Credentials
- the x509Credentials value to set.- Returns:
- the UserAuthentication object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-