Class UsernamePasswordCredentials

java.lang.Object
org.apache.commons.httpclient.UsernamePasswordCredentials
All Implemented Interfaces:
Credentials
Direct Known Subclasses:
NTCredentials

@Deprecated public class UsernamePasswordCredentials extends 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 Details

    • UsernamePasswordCredentials

      public UsernamePasswordCredentials()
      Deprecated.
      Do not use. Null user name no longer allowed
      Default constructor.
    • UsernamePasswordCredentials

      public UsernamePasswordCredentials(String usernamePassword)
      Deprecated.
      The constructor with the username and password combined string argument.
      Parameters:
      usernamePassword - the username:password formed string
      See Also:
    • UsernamePasswordCredentials

      public UsernamePasswordCredentials(String userName, String password)
      Deprecated.
      The constructor with the username and password arguments.
      Parameters:
      userName - the user name
      password - the password
  • Method Details

    • setUserName

      public void setUserName(String userName)
      Deprecated.
      Do not use. The UsernamePasswordCredentials objects should be immutable
      User name property setter. User name may not be null.
      Parameters:
      userName -
      See Also:
    • getUserName

      public String getUserName()
      Deprecated.
      User name property getter.
      Returns:
      the userName
      See Also:
    • setPassword

      public void setPassword(String password)
      Deprecated.
      Do not use. The UsernamePasswordCredentials objects should be immutable
      Password property setter.
      Parameters:
      password -
      See Also:
    • getPassword

      public String getPassword()
      Deprecated.
      Password property getter.
      Returns:
      the password
      See Also:
    • toString

      public String toString()
      Deprecated.
      Get this object string.
      Overrides:
      toString in class Object
      Returns:
      the username:password formed string
    • hashCode

      public int hashCode()
      Deprecated.
      Does a hash of both user name and password.
      Overrides:
      hashCode in class Object
      Returns:
      The hash code including user name and password.
    • equals

      public boolean equals(Object o)
      Deprecated.
      These credentials are assumed equal if the username and password are the same.
      Overrides:
      equals in class Object
      Parameters:
      o - The other object to compare with.
      Returns:
      true if the object is equivalent.