/[shmookey]/portconf/auth.py


UCC Code Repository

Contents of /portconf/auth.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 119 - (show annotations) (download) (as text)
Wed Jun 4 14:15:39 2008 UTC (12 years, 5 months ago) by shmookey
File MIME type: text/x-python
File size: 251 byte(s)
authentication all working

1 import ldap
2
3 def Authenticate (username, password):
4 con = ldap.initialize ("ldap://uwads.uwa.edu.au")
5 try:
6 con.simple_bind_s ("cn=%s,ou=staff,ou=Users,ou=UWA,dc=uwads,dc=uwa,dc=edu,dc=au" % username, password)
7 except:
8 return False
9 return True

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26