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
SimpleCredentials
implementation 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 boolean
equals(Object o)
String
getPassword()
String
getUserName()
Principal
getUserPrincipal()
int
hashCode()
String
toString()
-
-
-
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:
getUserPrincipal
in interfaceCredentials
-
getUserName
public String getUserName()
-
getPassword
public String getPassword()
- Specified by:
getPassword
in interfaceCredentials
-
-