org.apache.commons.httpclient
Class NTCredentials
java.lang.Object
|
+--org.apache.commons.httpclient.UsernamePasswordCredentials
|
+--org.apache.commons.httpclient.NTCredentials
- public class NTCredentials
- extends UsernamePasswordCredentials
Credentials
for use with the NTLM authentication scheme which requires additional
information.
- Since:
- 2.0
- Version:
- $Revision: 1.6.2.1 $ $Date: 2003/08/16 00:09:37 $
- Author:
- Adrian Sutton, Mike Bowler
Constructor Summary |
NTCredentials()
Default constructor. |
NTCredentials(java.lang.String userName,
java.lang.String password,
java.lang.String host,
java.lang.String domain)
Constructor. |
Method Summary |
java.lang.String |
getDomain()
Retrieves the name to authenticate with. |
java.lang.String |
getHost()
Retrieves the host name of the computer originating the request. |
void |
setDomain(java.lang.String domain)
Sets the domain to authenticate with. |
void |
setHost(java.lang.String host)
Sets the host name of the computer originating the request. |
java.lang.String |
toString()
Return a string representation of this object. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
NTCredentials
public NTCredentials()
- Default constructor.
NTCredentials
public NTCredentials(java.lang.String userName,
java.lang.String password,
java.lang.String host,
java.lang.String domain)
- Constructor.
- Parameters:
userName
- The user name. This should not include the domain to authenticate with.
For example: "user" is correct whereas "DOMAIN\\user" is not.password
- The password.host
- The host the authentication request is originating from. Essentially, the
computer name for this machine.domain
- The domain to authenticate within.
setDomain
public void setDomain(java.lang.String domain)
- Sets the domain to authenticate with.
- Parameters:
domain
- the NT domain to authenticate in.- See Also:
getDomain()
getDomain
public java.lang.String getDomain()
- Retrieves the name to authenticate with.
- Returns:
- String the domain these credentials are intended to authenticate with.
- See Also:
setDomain(String)
setHost
public void setHost(java.lang.String host)
- Sets the host name of the computer originating the request.
- Parameters:
host
- the Host the user is logged into.
getHost
public java.lang.String getHost()
- Retrieves the host name of the computer originating the request.
- Returns:
- String the host the user is logged into.
toString
public java.lang.String toString()
- Return a string representation of this object.
- Overrides:
- toString in class UsernamePasswordCredentials
- Returns:
- A string represenation of this object.
Copyright © 2001-2004 Apache Software Foundation. All Rights Reserved.