public class DefaultCredentialsProvider extends Object implements org.apache.http.client.CredentialsProvider, Serializable
NTLM authentication to use NTLM from HtlmUnit.
,
Serialized FormConstructor and Description |
---|
DefaultCredentialsProvider() |
Modifier and Type | Method and Description |
---|---|
void |
addCredentials(String username,
String password)
Adds credentials for the specified username/password for any host/port/realm combination.
|
void |
addCredentials(String username,
String password,
String host,
int port,
String realm)
Adds credentials for the specified username/password on the specified host/port for the
specified realm.
|
void |
addNTLMCredentials(String username,
String password,
String host,
int port,
String workstation,
String domain)
Adds NTLM credentials for the specified username/password on the specified host/port.
|
void |
addNTLMProxyCredentials(String username,
String password,
String host,
int port,
String workstation,
String domain)
Deprecated.
as of 2.8,
please use
addNTLMCredentials(String, String, String, int, String, String) instead |
void |
addProxyCredentials(String username,
String password)
Deprecated.
as of 2.8, please use
addCredentials(String, String) instead |
void |
addProxyCredentials(String username,
String password,
String host,
int port)
Deprecated.
as of 2.8, please use
addCredentials(String, String, String, int, String) instead |
void |
clear() |
org.apache.http.auth.Credentials |
getCredentials(org.apache.http.auth.AuthScope authscope) |
void |
setCredentials(org.apache.http.auth.AuthScope authscope,
org.apache.http.auth.Credentials credentials) |
String |
toString() |
public void addCredentials(String username, String password)
username
- the username for the new credentialspassword
- the password for the new credentialspublic void addCredentials(String username, String password, String host, int port, String realm)
username
- the username for the new credentialspassword
- the password for the new credentialshost
- the host to which to the new credentials apply (null if applicable to any host)port
- the port to which to the new credentials apply (negative if applicable to any port)realm
- the realm to which to the new credentials apply (null if applicable to any realm)@Deprecated public void addProxyCredentials(String username, String password)
addCredentials(String, String)
insteadusername
- the username for the new credentialspassword
- the password for the new credentials@Deprecated public void addProxyCredentials(String username, String password, String host, int port)
addCredentials(String, String, String, int, String)
insteadusername
- the username for the new credentialspassword
- the password for the new credentialshost
- the host to which to the new credentials apply (null if applicable to any host)port
- the port to which to the new credentials apply (negative if applicable to any port)public void addNTLMCredentials(String username, String password, String host, int port, String workstation, String domain)
username
- the username for the new credentials; should not include the domain to authenticate with;
for example: "user" is correct whereas "DOMAIN\\user" is notpassword
- the password for the new credentialshost
- the host to which to the new credentials apply (null if applicable to any host)port
- the port to which to the new credentials apply (negative if applicable to any port)workstation
- The workstation the authentication request is originating from.
Essentially, the computer name for this machine.domain
- the domain to authenticate within@Deprecated public void addNTLMProxyCredentials(String username, String password, String host, int port, String workstation, String domain)
addNTLMCredentials(String, String, String, int, String, String)
insteadusername
- the username for the new credentials; should not include the domain to authenticate with;
for example: "user" is correct whereas "DOMAIN\\user" is not.password
- the password for the new credentialshost
- the host to which to the new credentials apply (null if applicable to any host)port
- the port to which to the new credentials apply (negative if applicable to any port)workstation
- the host the authentication request is originating from; essentially, the computer name for
this machinedomain
- the domain to authenticate withinpublic void setCredentials(org.apache.http.auth.AuthScope authscope, org.apache.http.auth.Credentials credentials)
setCredentials
in interface org.apache.http.client.CredentialsProvider
public org.apache.http.auth.Credentials getCredentials(org.apache.http.auth.AuthScope authscope)
getCredentials
in interface org.apache.http.client.CredentialsProvider
public void clear()
clear
in interface org.apache.http.client.CredentialsProvider
Copyright © 2002–2014 Gargoyle Software Inc.. All rights reserved.