| java.lang.Object org.archive.crawler.datamodel.credential.CredentialAvatar
CredentialAvatar | public class CredentialAvatar implements Serializable(Code) | | A credential representation.
Added to the CrawlServer upon successful authentication. Used as a marker
of successful authentication event and for carrying credential
payload to be used subsequently doing preemptive authentications (e.g.
For case of RFC2617, needs to be offered everytime we're accessing inside
a protected area). Also carried by the CrawlURI when cycling through
processing chain trying a credential to see if it will authenticate.
This class exists because its not safe to keep references
to the settings derived Credential classes so instead of keeping references
to credential classes, we carry around this avatar.
Scope for avatars is crawlserver. Only used within a CrawlServer
scope.
Immutable.
author: stack version: $Revision: 4668 $, $Date: 2006-09-26 21:49:01 +0000 (Tue, 26 Sep 2006) $ |
Constructor Summary | |
public | CredentialAvatar(Class type, String key) Constructor. | public | CredentialAvatar(Class type, String key, String payload) Constructor.
Parameters: type - Type for this credential avatar. Parameters: key - Key for this credential avatar. Parameters: payload - Data credential needs rerunning or preempting. |
CredentialAvatar | public CredentialAvatar(Class type, String key)(Code) | | Constructor.
Parameters: type - Type for this credential avatar. Parameters: key - Key for this credential avatar. |
CredentialAvatar | public CredentialAvatar(Class type, String key, String payload)(Code) | | Constructor.
Parameters: type - Type for this credential avatar. Parameters: key - Key for this credential avatar. Parameters: payload - Data credential needs rerunning or preempting. May benull and then just the presence is used as signifier of successfulauth. |
checkType | protected boolean checkType(Class candidateType)(Code) | | Parameters: candidateType - Type to check. True if this is a known credential type. |
getCredential | public Credential getCredential(SettingsHandler handler, CrawlURI curi)(Code) | | Parameters: handler - Settings handler. Parameters: curi - CrawlURI to use for context. The credential this avatar represents. |
getPayload | public String getPayload()(Code) | | Returns the payload. May be null. |
getType | public Class getType()(Code) | | Type represented by this avatar. |
match | public boolean match(Class otherType)(Code) | | Parameters: otherType - Class to match. True if this credential avatar is of same type. |
match | public boolean match(Class otherType, String otherKey)(Code) | | Parameters: otherType - Credential to match. Parameters: otherKey - Key to test. True if this is avatar for passed credential. |
|
|