Class SimpleChallengeResponseManager

java.lang.Object
  |
  +--SimpleChallengeResponseManager
All Implemented Interfaces:
ChallengeResponseManager

class SimpleChallengeResponseManager
extends java.lang.Object
implements ChallengeResponseManager

This class is a very simple implementation of the ChallengeResponseManager interface. It basically opens a simple text file that contains user identifiers and passwords ("secrets") for the one-time authentication, the "Impostor user database". Instead of being a true one-time authentication mechanism, however, this simple implementation merely checks the secret value (i.e. the password) itself.


Constructor Summary
protected SimpleChallengeResponseManager(java.lang.String filename)
           
 
Method Summary
 java.lang.Object getNewChallenge()
          The Impostor daemon calls this method in order to get the next challenge for carrying out user authentication.
 boolean isValidIdentifier(java.lang.Object id)
          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 id, 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

SimpleChallengeResponseManager

protected SimpleChallengeResponseManager(java.lang.String filename)
                                  throws java.io.IOException,
                                         java.io.FileNotFoundException
Method Detail

getNewChallenge

public java.lang.Object getNewChallenge()
Description copied from interface: ChallengeResponseManager
The Impostor daemon calls this method in order to get the next challenge for carrying out user authentication. Note that it is independent of any particular user since the challenge is issued BEFORE the user has a chance to identify him/herself.

Specified by:
getNewChallenge in interface ChallengeResponseManager

verifyResponse

public boolean verifyResponse(java.lang.Object id,
                              java.lang.Object challenge,
                              java.lang.Object response)
Description copied from interface: ChallengeResponseManager
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. The challenge object had been previously acquired using the getNewChallenge method. The identifier and response parameters are String objects, as entered by the user into the Impostor login page (login.html).

Specified by:
verifyResponse in interface ChallengeResponseManager

isValidIdentifier

public boolean isValidIdentifier(java.lang.Object id)
Description copied from interface: ChallengeResponseManager
The Impostor daemon calls this method in order to determine whether or not a given user identifier is valid (known). At the moment, the identifier is a String object that is retrieved from the user input of the Impostor login page (login.html).

Specified by:
isValidIdentifier in interface ChallengeResponseManager