Package org.apache.hc.client5.http.auth
Class UsernamePasswordCredentials
java.lang.Object
org.apache.hc.client5.http.auth.UsernamePasswordCredentials
- All Implemented Interfaces:
Serializable,Credentials
@Contract(threading=IMMUTABLE)
public class UsernamePasswordCredentials
extends Object
implements Credentials, Serializable
Simple
Credentials representation based on a user name / password
pair.- Since:
- 4.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final char[]private final BasicUserPrincipalprivate static final long -
Constructor Summary
ConstructorsConstructorDescriptionUsernamePasswordCredentials(String userName, char[] password) The constructor with the username and password arguments. -
Method Summary
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
principal
-
password
private final char[] password
-
-
Constructor Details
-
UsernamePasswordCredentials
The constructor with the username and password arguments.- Parameters:
userName- the user namepassword- the password
-
-
Method Details
-
getUserPrincipal
- Specified by:
getUserPrincipalin interfaceCredentials
-
getUserName
-
getPassword
public char[] getPassword()- Specified by:
getPasswordin interfaceCredentials
-
hashCode
public int hashCode() -
equals
-
toString
-