Package org.apache.http.auth
Class UsernamePasswordCredentials
- java.lang.Object
-
- org.apache.http.auth.UsernamePasswordCredentials
-
- All Implemented Interfaces:
Serializable,Credentials
@Contract(threading=IMMUTABLE) public class UsernamePasswordCredentials extends Object implements Credentials, Serializable
SimpleCredentialsimplementation based on a user name / password pair.- Since:
- 4.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UsernamePasswordCredentials(String usernamePassword)Deprecated.(4.5) will be replaced withString,char[]in 5.0UsernamePasswordCredentials(String userName, String password)The constructor with the username and password arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetPassword()StringgetUserName()PrincipalgetUserPrincipal()inthashCode()StringtoString()
-
-
-
Constructor Detail
-
UsernamePasswordCredentials
@Deprecated public UsernamePasswordCredentials(String usernamePassword)
Deprecated.(4.5) will be replaced withString,char[]in 5.0The constructor with the username and password combined string argument.- Parameters:
usernamePassword- the username:password formed string- See Also:
toString()
-
-
Method Detail
-
getUserPrincipal
public Principal getUserPrincipal()
- Specified by:
getUserPrincipalin interfaceCredentials
-
getUserName
public String getUserName()
-
getPassword
public String getPassword()
- Specified by:
getPasswordin interfaceCredentials
-
-