|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--impostor.EmptyManager
This class provides simple or empty implementations of the interfaces of the impostor package.
It is used internally by an Impostor daemon that is instantiated without all arguments.
| Constructor Summary | |
(package private) |
EmptyManager()
|
| Method Summary | |
java.lang.String |
fillInUsernameAndPassword(java.lang.String username,
java.lang.String password)
A RequestRecognizer must also implement the functionality to fill a given username and password into the HTTP request with which is was initialized, such that the resulting HTTP request effectively logs the specified username into the site, using the specified password. |
java.lang.String |
filterHTTPHeaders(java.lang.String string)
The Impostor daemon calls this method in order to remove sensitive information from HTTP headers sent from websites to the user's browser. |
java.lang.String |
filterWebPageLine(java.lang.String string)
The Impostor daemon calls this method in order to remove sensitive information from HTML pages sent from websites to the user's browser. |
java.lang.String |
getLogEntry()
The Impostor daemon calls this method in order to store an entry in a log for this RequestRecognizer. |
java.lang.Object |
getNewChallenge()
The Impostor daemon calls this method in order to get the next challenge for carrying out user authentication. |
java.lang.String |
getPasswordForIdentifier(java.lang.Object identifier,
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 |
getServiceName()
The Impostor daemon calls this method only if this RequestRecognizer's isRecognized method returns
true. |
java.lang.String |
getUsernameForIdentifier(java.lang.Object identifier,
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. |
void |
init(java.lang.String host,
int port,
java.lang.String request)
The Impostor daemon calls this method in order to initialize the RequestRecognizer. |
boolean |
isRecognized()
The Impostor daemon calls this method in order to determine whether this RequestRecognizer recognized the HTTP request with which it was initialized as a login attempt into a website. |
boolean |
isValidIdentifier(java.lang.Object identifier)
The Impostor daemon calls this method in order to determine whether or not a given user identifier is valid (known). |
boolean |
verifyResponse(java.lang.Object identifier,
java.lang.Object challenge,
java.lang.Object response)
The Impostor daemon calls this method in order to verify whether or not the response from the user identified by the given identifier matches the given challenge. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
EmptyManager()
| Method Detail |
public java.lang.String filterHTTPHeaders(java.lang.String string)
ContentFilter
filterHTTPHeaders in interface ContentFilterpublic java.lang.String filterWebPageLine(java.lang.String string)
ContentFilter
filterWebPageLine in interface ContentFilterpublic java.lang.Object getNewChallenge()
ChallengeResponseManager
getNewChallenge in interface ChallengeResponseManagerpublic boolean isValidIdentifier(java.lang.Object identifier)
ChallengeResponseManager
isValidIdentifier in interface ChallengeResponseManager
public boolean verifyResponse(java.lang.Object identifier,
java.lang.Object challenge,
java.lang.Object response)
ChallengeResponseManager
verifyResponse in interface ChallengeResponseManager
public java.lang.String getUsernameForIdentifier(java.lang.Object identifier,
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 identifier,
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
public void init(java.lang.String host,
int port,
java.lang.String request)
RequestRecognizer
init in interface RequestRecognizerpublic boolean isRecognized()
RequestRecognizerinit method of this object has not been
called yet, or if the request was not recognized as a login attempt. If this method returns
true, the Impostor daemon expects the remaining methods to return non-null values.
isRecognized in interface RequestRecognizerpublic java.lang.String getServiceName()
RequestRecognizerisRecognized method returns
true. This method should return the name of the service or website this recognized request
is a login attempt for. The daemon uses this name in order to generate the Impostor login page.
getServiceName in interface RequestRecognizer
public java.lang.String fillInUsernameAndPassword(java.lang.String username,
java.lang.String password)
RequestRecognizerisRecognized method returns
true. The daemon will call this method only after a valid Impostor user has
successfully authenticated him/herself. (as determined by the imlementation of a
ChallengeResponseManager). The username and password the Impostor daemon passes as parameters
to this method are determined by the implementation of a UserManager.
fillInUsernameAndPassword in interface RequestRecognizerpublic java.lang.String getLogEntry()
RequestRecognizer
getLogEntry in interface RequestRecognizer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||