com.microsoft.tfs.core.credentials
Class CachedCredentials
java.lang.Object
com.microsoft.tfs.core.credentials.CachedCredentials
public class CachedCredentials
- extends java.lang.Object
Represents credentials used to authenticate to TFS or other network resources
(HTTP proxies) that can be saved on the client.
- Thread-safety:
- thread-safe
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
CachedCredentials
public CachedCredentials(java.net.URI uri,
Credentials credentials)
- Creates
CachedCredentials
from an existing Credentials
object.
- Parameters:
uri
- the URI
the credentials are for (must not be
null
)credentials
- the credentials (must not be null
)
CachedCredentials
public CachedCredentials(java.net.URI uri,
java.lang.String username,
java.lang.String password)
- Creates
CachedCredentials
for the given URI
.
- Parameters:
uri
- the URI
(must not be null
)username
- the username including domain (may be null
or empty)password
- the password (may be null
or empty)
getURI
public java.net.URI getURI()
- Returns:
- the URI these credentials are for (never
null
)
getUsername
public java.lang.String getUsername()
- Returns:
- the username with domain (may be
null
)
getPassword
public java.lang.String getPassword()
- Returns:
- the password (may be
null
)
toCredentials
public Credentials toCredentials()
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
© 2012 Microsoft. All rights reserved.