public class HttpCredential extends java.lang.Object implements ConfigurationObject
Note: proxies are also HttpCredentials and when searching for credentials, the proxies will also be searched for credentials.
| Constructor and Description |
|---|
HttpCredential() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getUsername()
Get the username.
|
boolean |
matches(MatchInfo matchInfo)
Returns true if this proxy should be used for the provided URI.
|
void |
setMatchers(java.util.List<? extends URIMatcher> matchers)
Matchers are used to choose which requests the credentials apply to.
|
void |
setPassword(java.lang.String password)
The password for authenticating with the credentials.
|
void |
setUsername(java.lang.String username)
The username for authenticating with the credentials.
|
org.apache.http.auth.Credentials |
toCredentials(org.apache.http.auth.AuthScope authscope)
Check if this applies to the provided authorization scope and return the credentials for that scope or null if it
doesn't apply to the scope.
|
void |
validate(java.util.List<java.lang.Throwable> validationErrors,
Configuration configuration)
validate that the configuration was correct.
|
public void setMatchers(java.util.List<? extends URIMatcher> matchers)
matchers - the matchers to use to determine which requests the credentials can be used forURIMatcher,
RestrictUrisProcessorpublic void setUsername(java.lang.String username)
This is optional
username - the username for authenticating with the credentialsprotected java.lang.String getUsername()
public void setPassword(java.lang.String password)
This is optional
password - the password for authenticating with the credentialspublic void validate(java.util.List<java.lang.Throwable> validationErrors,
Configuration configuration)
ConfigurationObjectvalidate in interface ConfigurationObjectvalidationErrors - a list to add any detected errors to.configuration - the containing configurationpublic boolean matches(MatchInfo matchInfo) throws java.net.SocketException, java.net.UnknownHostException, java.net.MalformedURLException
matchInfo - the information for making the patchjava.net.SocketExceptionjava.net.UnknownHostExceptionjava.net.MalformedURLException@Nullable public final org.apache.http.auth.Credentials toCredentials(org.apache.http.auth.AuthScope authscope)
authscope - the scope to test against.