Class Authentication
java.lang.Object
org.sonatype.gradle.plugins.scan.nexus.iq.client.common.Authentication
- All Implemented Interfaces:
Serializable
This class is an abstraction of authentication credentials. Internally passwords are stored as
char[] to
avoid logging any sensitive information as well as allowing the objects to be garbage collected properly.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAuthentication(String username, char[] password) Bothusernameandpasswordare required.Authentication(String username, String password) Bothusernameandpasswordare required. -
Method Summary
-
Constructor Details
-
Authentication
Bothusernameandpasswordare required.- Parameters:
username- the username.password- the password.- Throws:
NullPointerException- if eitherusernameorpasswordnot provided.
-
Authentication
Bothusernameandpasswordare required.- Parameters:
username- the username.password- the password.- Throws:
NullPointerException- if eitherusernameorpasswordnot provided.
-
-
Method Details
-
getUsername
- Returns:
- the username.
-
getPassword
public char[] getPassword()- Returns:
- the password.
-