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
Simple
Credentials implementation based on a user name / password
pair.- Since:
- 4.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUsernamePasswordCredentials(String usernamePassword) Deprecated.UsernamePasswordCredentials(String userName, String password) The constructor with the username and password arguments. -
Method Summary
-
Constructor Details
-
UsernamePasswordCredentials
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:
-
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
- Specified by:
getPasswordin interfaceCredentials
-
hashCode
public int hashCode() -
equals
-
toString
-
String,char[]in 5.0