com.microsoft.tfs.core.httpclient
Class UsernamePasswordCredentials

java.lang.Object
  extended by com.microsoft.tfs.core.httpclient.Credentials
      extended by com.microsoft.tfs.core.httpclient.UsernamePasswordCredentials
Direct Known Subclasses:
NTCredentials, PreemptiveUsernamePasswordCredentials

public class UsernamePasswordCredentials
extends Credentials

Username and password Credentials.


Constructor Summary
UsernamePasswordCredentials(java.lang.String username, java.lang.String password)
          The constructor with the username and password arguments.
 
Method Summary
 boolean equals(java.lang.Object o)
          These credentials are assumed equal if the username and password are the same.
 java.lang.String getPassword()
          Password property getter.
 java.lang.String getUsername()
          User name property getter.
 int hashCode()
          Does a hash of both user name and password.
 void setPassword(java.lang.String password)
           
 java.lang.String toString()
          Get this object string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UsernamePasswordCredentials

public UsernamePasswordCredentials(java.lang.String username,
                                   java.lang.String password)
The constructor with the username and password arguments.

Parameters:
username - the user name
password - the password
Method Detail

getUsername

public java.lang.String getUsername()
User name property getter.

Returns:
the userName
See Also:
#setUserName(String)

setPassword

public void setPassword(java.lang.String password)

getPassword

public java.lang.String getPassword()
Password property getter.

Returns:
the password
See Also:
setPassword(String)

toString

public java.lang.String toString()
Get this object string.

Overrides:
toString in class java.lang.Object
Returns:
the username:password formed string

hashCode

public int hashCode()
Does a hash of both user name and password.

Specified by:
hashCode in class Credentials
Returns:
The hash code including user name and password.

equals

public boolean equals(java.lang.Object o)
These credentials are assumed equal if the username and password are the same.

Specified by:
equals in class Credentials
Parameters:
o - The other object to compare with.
Returns:
true if the object is equivalent.


© 2015 Microsoft. All rights reserved.