|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--SimpleUserManager
This class is provides the mapping between Impostor user identifiers
and credentials for SSO-enabled websites. This class works very close
with the HotmailYahooMailRHULMailRecognizer class; it returns
the usernames and passwords for the Hotmail, YahooMail and RHUL webmail
services, of identified Impostor users.
The class is instantiated with the filename of the credential database.
This is a simple text file following the format below.
ImpostorUser1
In above example example there are two Impostor users, identified by
hotmailaccount1:hotmailpassword1
yahooaccount1:yahoopassword1
rhulaccount1:rhulAuthString1
ImpostorUser2
hotmailaccount2:hotmailpassword2
yahooaccount2:yahoopassword2
rhulaccount2:rhulAuthString2
ImpostorUser1 and ImpostorUser2. They have
the usernames and passwords shown. The order of entries in the credential
database file is crucial and must be the one shown in the example.
| Constructor Summary | |
protected |
SimpleUserManager(java.lang.String filename)
|
| Method Summary | |
java.lang.String |
getPasswordForIdentifier(java.lang.Object id,
RequestRecognizer rr)
The Impostor daemon calls this method in order to determine the password that the Impostor user identified by the given identifier maintains at the website for which the given RequestRecognizer
recognized a login request. |
RequestRecognizer |
getRequestRecognizerInstance()
A UserManager implementation has to work very close with a RequestRecognizer implementation:
the UserManager implementation knows the usernames and passwords of Impostor users at a specific
set of websites, while the RequestRecognizer implementation recognizes HTTP login requests
for exactly this set of websites. |
java.lang.String |
getUsernameForIdentifier(java.lang.Object id,
RequestRecognizer rr)
The Impostor daemon calls this method in order to determine the username that the Impostor user identified by the given identifier maintains at the website for which the given RequestRecognizer
recognized a login request. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected SimpleUserManager(java.lang.String filename)
| Method Detail |
public java.lang.String getUsernameForIdentifier(java.lang.Object id,
RequestRecognizer rr)
throws java.lang.Exception
UserManagerRequestRecognizer
recognized a login request. The identifier is a String object, obtained from the user
input from the Impostor login page, and the RequestRecognizer is the RequestRecognizer
instance that recognized the HTTP request as a login request into a website.isValid method
of the ChallengeResponseManager implementation with which the daemon was instantiated
Thus, a UserManager and a ChallengeResponseManager have common user identifiers: the
identifiers of Impostor users.
getUsernameForIdentifier in interface UserManagerjava.lang.Exception
public java.lang.String getPasswordForIdentifier(java.lang.Object id,
RequestRecognizer rr)
throws java.lang.Exception
UserManagerRequestRecognizer
recognized a login request. The identifier is a String object, obtained from the user
input from the Impostor login page, and the RequestRecognizer is a RequestRecognizer
implementation previously obtained using the getRequestRecognizerInstance method.
getPasswordForIdentifier in interface UserManagerjava.lang.Exceptionpublic RequestRecognizer getRequestRecognizerInstance()
UserManagerRequestRecognizer implementation:
the UserManager implementation knows the usernames and passwords of Impostor users at a specific
set of websites, while the RequestRecognizer implementation recognizes HTTP login requests
for exactly this set of websites. This method should return a new RequestRecognizer
instance of the RequestRecognizer this UserManager implementation works with. The Impostor daemon
calls this method for every incoming HTTP request, as it needs a fresh RequestRecognizer.isValid method
of the ChallengeResponseManager implementation with which the Impostor was instantiated.
Thus, a UserManager and a ChallengeResponseManager have common user identifiers: the
identifiers of Impostor users.
getRequestRecognizerInstance in interface UserManager
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||