org.apache.http.auth
Class UsernamePasswordCredentials
java.lang.Object
org.apache.http.auth.UsernamePasswordCredentials
- All Implemented Interfaces:
- Credentials
@Immutable
public class UsernamePasswordCredentials
- extends Object
- implements Credentials
Simple Credentials
implementation based on a user name / password
pair.
- Since:
- 4.0
UsernamePasswordCredentials
public UsernamePasswordCredentials(String usernamePassword)
- 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 namepassword
- the password
getUserPrincipal
public Principal getUserPrincipal()
- Specified by:
getUserPrincipal
in interface Credentials
getUserName
public String getUserName()
getPassword
public String getPassword()
- Specified by:
getPassword
in interface Credentials
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.