Table of Contents

Module: ldap swocket/auth/ldap.py

example LDAP authentication module

Functions   
auth
authFunction
authInit
cleanup
findAttribute
  auth 
auth (
        ldap_host,
        ldap_basedn,
        username,
        password,
        )

internal function to do the hard work

  authFunction 
authFunction ( passInfo )

authorize a client

Exceptions   
authorizeError( "%s is already connected" % user )
authorizeError("LDAP authorization failed %s/%s %s" %( user, pw, e ) )
  authInit 
authInit ( parent,  doc )

initialize ourselves on server start

  cleanup 
cleanup ( self )

the cleanup process for the admin state data

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

helper function to see if an xml attribute list has a certain key. accepts a default incase it doesn't exist, otherwise it raises an authorizeError

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