Table of Contents

Class: OTP Twisted-0.17.4/twisted/python/otp.py

An automatic version of the OTP-Authenticator

Updates the sequence and the keeps last approved password on success On the next authentication, the stored password is hashed and checked up against the one given by the user. If they match, the sequencecounter is decreased and the circle is closed.

This object should be glued to each user

Note: It does NOT reset the sequence when the combinations left approach zero, This has to be done manuelly by instancing a new object

Base Classes   
OTPAuthenticator
Methods   
__init__
authenticate
challenge
  __init__ 
__init__ (
        self,
        passwd,
        sequence=INITIALSEQUENCE,
        hash=md5,
        )

Initialize the OTP-Sequence, and discard the password

  authenticate 
authenticate ( self,  phrase )

Test the phrase against the last challenge issued

Exceptions   
Unauthorized( "Failed" )
Unauthorized( msg )
  challenge 
challenge ( self )

Return a challenge string


Table of Contents

This document was automatically generated on Sat Apr 20 01:31:23 2002 by HappyDoc version 2.0