Package beepy :: Package profiles :: Module saslotpprofile :: Class SASLOTPProfile
[show private | hide private]
[frames | no frames]

Class SASLOTPProfile

Profile --+    
          |    
SASLProfile --+
              |
             SASLOTPProfile


A SASLOTPProfile is a SASL Profile that implements the OTP mechanism for one time password authentication.
Method Summary
  __init__(self, session)
__init__() is used to set up special SASL data such as certificates, user dbases, etc.
  authenticate(self, blob)
  getPassphraseFromUser()
When you implement an application that makes use of this library, you will need to instanciate this class and implement this function to interface with the user to get the passphrase.
  parseResponse(self, data)
parseResponse() converts whatever we received from the other end into a bytestring.
  processMessage(self, msg)
All processMessage should do is move the session from non-authenticated to authenticated.
  respondToChallenge(self, challenge, msg)
  sendAuth(self, passphrase, authentid, userid)
doAuthentication() performs the authentication phase of a OTP session in a single call.
  sendChallenge(self, msgno)
sendChallenge() formats and sends a reply to the client based on the userid and authentid sent as a message
  setAlgorithm(self, algo)
Set the algorithm used for OTP.
  setPassphrase(self, passphrase)
  splitAuth(self, data)
splitAuth() undoes the concatenation of userid and authentid separated by a NUL character.
    Inherited from SASLProfile
  decodeBlob(self, data)
decodeBlob() extracts the data from the <blob> section of the payload data and decodes it from base64.
  encodeBlob(self, data)
encodeBlob() takes the data passed in and returns the appropriate <blob></blob> structure with base64 encoded data.
  parseError(self, data)
parseError() extracts the error code from the <error> block
  parseStatus(self, data)
parseStatus() extracts the status code from the <blob> block
    Inherited from Profile
  mimeDecode(self, payload)
mimeDecode() is a convenience function used to help make life easier for profile programmers, like me.
  mimeEncode(self, payload, contentType, encoding)
mimeEncode() is a convenience function used to help make life easier for profile programmers, like me.
  setChannel(self, channel)
setChannel() binds this Profile to the Channel it belongs to.

Method Details

__init__(self, session, profileInit=None, init_callback=None)
(Constructor)

__init__() is used to set up special SASL data such as certificates, user dbases, etc.
Overrides:
beepy.profiles.saslprofile.SASLProfile.__init__ (inherited documentation)

getPassphraseFromUser()

When you implement an application that makes use of this library, you will need to instanciate this class and implement this function to interface with the user to get the passphrase. It should return a string containing the passphrase.

parseResponse(self, data)

parseResponse() converts whatever we received from the other end into a bytestring. It needs to recognise word:, hex:, init-word: and init-hex formats.

processMessage(self, msg)

All processMessage should do is move the session from non-authenticated to authenticated.
Overrides:
beepy.profiles.profile.Profile.processMessage

sendAuth(self, passphrase, authentid, userid=None)

doAuthentication() performs the authentication phase of a OTP session in a single call.

sendChallenge(self, msgno)

sendChallenge() formats and sends a reply to the client based on the userid and authentid sent as a message

setAlgorithm(self, algo)

Set the algorithm used for OTP. Supported values are 'md5' or 'sha'.

splitAuth(self, data)

splitAuth() undoes the concatenation of userid and authentid separated by a NUL character.

Generated by Epydoc 2.0 on Thu Sep 30 14:39:25 2004 http://epydoc.sf.net