Table of Contents

Module: plaintext swocket/auth/plaintext.py

authorize from a comma delimited plaintext file, cache the file for speed, check its mtime and update incase you feel like changing user/passwords during runtime.. slick :)

Imported modules   
from stat import *
Functions   
authFunction
authInit
checkFile
cleanup
findAttribute
  authFunction 
authFunction ( passInfo )

authorize the client

Exceptions   
authorizeError( "invalid password for user %s" % userKey )
authorizeError( "user %s is already connected" % user )
authorizeError( "user %s not in password file" % userKey )
  authInit 
authInit ( parent,  doc )

do the initial setup and cache

  checkFile 
checkFile ( pdict )

refresh our cache from the file if we need to

  cleanup 
cleanup ( self )

cleanup on user logout/disconnect

  findAttribute 
findAttribute (
        attributes,
        key,
        default=None,
        )

see ldap if you really can't figure this out

Exceptions   
authorizeError( "attribute %s missing or invalid" % key )

Table of Contents

This document was automatically generated on Wed Jul 11 15:13:59 2001 by HappyDoc version r1_5