Package org.apache.commons.httpclient
Class UsernamePasswordCredentials
- java.lang.Object
-
- org.apache.commons.httpclient.UsernamePasswordCredentials
-
- All Implemented Interfaces:
Credentials
- Direct Known Subclasses:
NTCredentials
@Deprecated public class UsernamePasswordCredentials extends java.lang.Object implements Credentials
Deprecated.Jakarta Commons HttpClient 3.x is deprecated in the Jenkins project. It is not recommended to use it in any new code. Instead, use HTTP client API plugins as a dependency in your code. E.g. Apache HttpComponents Client API 4.x Plugin or Async HTTP Client Plugin.Username and password
Credentials
.
-
-
Constructor Summary
Constructors Constructor Description UsernamePasswordCredentials()
Deprecated.Do not use.UsernamePasswordCredentials(java.lang.String usernamePassword)
Deprecated.The constructor with the username and password combined string argument.UsernamePasswordCredentials(java.lang.String userName, java.lang.String password)
Deprecated.The constructor with the username and password arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Deprecated.These credentials are assumed equal if the username and password are the same.java.lang.String
getPassword()
Deprecated.Password property getter.java.lang.String
getUserName()
Deprecated.User name property getter.int
hashCode()
Deprecated.Does a hash of both user name and password.void
setPassword(java.lang.String password)
Deprecated.Do not use.void
setUserName(java.lang.String userName)
Deprecated.Do not use.java.lang.String
toString()
Deprecated.Get this object string.
-
-
-
Constructor Detail
-
UsernamePasswordCredentials
public UsernamePasswordCredentials()
Deprecated.Do not use. Null user name no longer allowedDefault constructor.
-
UsernamePasswordCredentials
public UsernamePasswordCredentials(java.lang.String usernamePassword)
Deprecated.The constructor with the username and password combined string argument.- Parameters:
usernamePassword
- the username:password formed string- See Also:
toString()
-
UsernamePasswordCredentials
public UsernamePasswordCredentials(java.lang.String userName, java.lang.String password)
Deprecated.The constructor with the username and password arguments.- Parameters:
userName
- the user namepassword
- the password
-
-
Method Detail
-
setUserName
public void setUserName(java.lang.String userName)
Deprecated.Do not use. The UsernamePasswordCredentials objects should be immutableUser name property setter. User name may not be null.- Parameters:
userName
-- See Also:
getUserName()
-
getUserName
public java.lang.String getUserName()
Deprecated.User name property getter.- Returns:
- the userName
- See Also:
setUserName(String)
-
setPassword
public void setPassword(java.lang.String password)
Deprecated.Do not use. The UsernamePasswordCredentials objects should be immutablePassword property setter.- Parameters:
password
-- See Also:
getPassword()
-
getPassword
public java.lang.String getPassword()
Deprecated.Password property getter.- Returns:
- the password
- See Also:
setPassword(String)
-
toString
public java.lang.String toString()
Deprecated.Get this object string.- Overrides:
toString
in classjava.lang.Object
- Returns:
- the username:password formed string
-
hashCode
public int hashCode()
Deprecated.Does a hash of both user name and password.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- The hash code including user name and password.
-
equals
public boolean equals(java.lang.Object o)
Deprecated.These credentials are assumed equal if the username and password are the same.- Overrides:
equals
in classjava.lang.Object
- Parameters:
o
- The other object to compare with.- Returns:
true
if the object is equivalent.
-
-