|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.archive.crawler.datamodel.credential.CredentialAvatar
public class CredentialAvatar
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.
Constructor Summary | |
---|---|
CredentialAvatar(java.lang.Class type,
java.lang.String key)
Constructor. |
|
CredentialAvatar(java.lang.Class type,
java.lang.String key,
java.lang.String payload)
Constructor. |
Method Summary | |
---|---|
protected boolean |
checkType(java.lang.Class candidateType)
|
Credential |
getCredential(SettingsHandler handler,
CrawlURI curi)
|
java.lang.String |
getKey()
|
java.lang.String |
getPayload()
|
java.lang.Class |
getType()
|
boolean |
match(java.lang.Class otherType)
|
boolean |
match(java.lang.Class otherType,
java.lang.String otherKey)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CredentialAvatar(java.lang.Class type, java.lang.String key)
type
- Type for this credential avatar.key
- Key for this credential avatar.public CredentialAvatar(java.lang.Class type, java.lang.String key, java.lang.String payload)
type
- Type for this credential avatar.key
- Key for this credential avatar.payload
- Data credential needs rerunning or preempting. May be
null and then just the presence is used as signifier of successful
auth.Method Detail |
---|
protected boolean checkType(java.lang.Class candidateType)
candidateType
- Type to check.
public java.lang.String getPayload()
public java.lang.String getKey()
public java.lang.Class getType()
public boolean match(java.lang.Class otherType)
otherType
- Class to match.
public boolean match(java.lang.Class otherType, java.lang.String otherKey)
otherType
- Credential to match.otherKey
- Key to test.
public java.lang.String toString()
toString
in class java.lang.Object
public Credential getCredential(SettingsHandler handler, CrawlURI curi)
handler
- Settings handler.curi
- CrawlURI to use for context.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |