org.apache.http.auth
Class UsernamePasswordCredentials
java.lang.Object
   org.apache.http.auth.UsernamePasswordCredentials
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:
- Serialized Form
 
 
 
UsernamePasswordCredentials
@Deprecated
public UsernamePasswordCredentials(String usernamePassword)
- Deprecated. (4.5) will be replaced with String,char[]in 5.0
 
- The constructor with the username and password combined string argument.
 
- Parameters:
- usernamePassword- the username:password formed string
- See Also:
- toString()
 
UsernamePasswordCredentials
public UsernamePasswordCredentials(String userName,
                                   String password)
- The constructor with the username and password arguments.
 
- Parameters:
- userName- the user name
- password- the password
 
getUserPrincipal
public Principal getUserPrincipal()
- 
- Specified by:
- getUserPrincipalin interface- Credentials
 
- 
 
getUserName
public String getUserName()
- 
 
- 
 
getPassword
public String getPassword()
- 
- Specified by:
- getPasswordin interface- Credentials
 
- 
 
hashCode
public int hashCode()
- 
- Overrides:
- hashCodein class- Object
 
- 
 
equals
public boolean equals(Object o)
- 
- Overrides:
- equalsin class- Object
 
- 
 
toString
public String toString()
- 
- Overrides:
- toStringin class- Object
 
- 
 
Copyright © 1999–2020 The Apache Software Foundation. All rights reserved.