public class HttpAuthenticationCredential extends Credential
Modifier and Type | Field and Description |
---|---|
protected String |
login
Login.
|
protected String |
password
Password.
|
protected String |
realm
Basic/Digest Auth realm.
|
domain
Constructor and Description |
---|
HttpAuthenticationCredential()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static HttpAuthenticationCredential |
getByRealm(Set<Credential> rfc2617Credentials,
String realm,
CrawlURI context)
Convenience method that does look up on passed set using realm for key.
|
String |
getKey() |
String |
getLogin() |
String |
getPassword() |
String |
getPrerequisite(CrawlURI curi)
Return the authentication URI, either absolute or relative, that serves
as prerequisite the passed
curi . |
String |
getRealm() |
boolean |
hasPrerequisite(CrawlURI curi) |
boolean |
isEveryTime() |
boolean |
isPost() |
boolean |
isPrerequisite(CrawlURI curi) |
boolean |
populate(CrawlURI curi,
org.apache.commons.httpclient.HttpClient http,
org.apache.commons.httpclient.HttpMethod method,
Map<String,String> httpAuthChallenges) |
void |
setLogin(String login) |
void |
setPassword(String password) |
void |
setRealm(String realm) |
attach, detach, detachAll, getDomain, rootUriMatch, setDomain
protected String realm
protected String login
protected String password
public String getRealm()
public void setRealm(String realm)
public String getLogin()
public void setLogin(String login)
public String getPassword()
public void setPassword(String password)
public boolean isPrerequisite(CrawlURI curi)
isPrerequisite
in class Credential
curi
- CrawlURI to look at.public boolean hasPrerequisite(CrawlURI curi)
hasPrerequisite
in class Credential
curi
- CrawlURI to look at.public String getPrerequisite(CrawlURI curi)
Credential
curi
.getPrerequisite
in class Credential
curi
- CrawlURI to look at.public String getKey()
getKey
in class Credential
public boolean isEveryTime()
isEveryTime
in class Credential
public boolean populate(CrawlURI curi, org.apache.commons.httpclient.HttpClient http, org.apache.commons.httpclient.HttpMethod method, Map<String,String> httpAuthChallenges)
populate
in class Credential
curi
- CrawlURI to as for context.http
- Instance of httpclient.method
- Method to populate.public boolean isPost()
isPost
in class Credential
public static HttpAuthenticationCredential getByRealm(Set<Credential> rfc2617Credentials, String realm, CrawlURI context)
rfc2617Credentials
- Set of Rfc2617 credentials. If passed set is
not pure Rfc2617Credentials then will be ClassCastExceptions.realm
- Realm to find in passed set.context
- Context to use when searching the realm.Copyright © 2003-2014 Internet Archive. All Rights Reserved.