The unified diff between revisions [f5d1faf3..] and [eb66d9c4..] is displayed below. It can also be downloaded as a raw diff.
#
#
# patch "config.py"
# from [f89d794ab1fa6ef7054b6d7969c8b634aa2a8261]
# to [be6480bd5050ca2fecc19da6be0882720c953346]
#
# patch "uccid/auth/__init__.py"
# from [ba3a7085b6969117e0989cc158ddcf33da1b403e]
# to [32e8f23bbc307250a0cc91b5b396ad851ced894a]
#
# patch "uccid/auth/ldapauth.py"
# from [d6cbaa4659aac710e2bc04a1b078fbea44154cb6]
# to [64291692aceba723c5ad3fafebec11f237d54d6d]
#
============================================================
--- config.py f89d794ab1fa6ef7054b6d7969c8b634aa2a8261
+++ config.py be6480bd5050ca2fecc19da6be0882720c953346
@@ -10,6 +10,7 @@ from uccid.auth import *
import uccid, uccid.auth
from uccid import *
from uccid.auth import *
+from uccid.identity import *
# Do you want to see error messages, ad et al?
debug = True
@@ -25,7 +26,8 @@ domain, path = url.split('//', 1).pop().
# Should these be here?
secure = url.startswith('https')
domain, path = url.split('//', 1).pop().split('/', 1)
-path[0:0] = "/"
+if not path.startswith('/'):
+ path = "/" + path
# The UCCid server can provide several forms of identities using any number of
# authentication methods. See below for a simple example. More information and
@@ -40,7 +42,7 @@ identities = []
# to provide a CN with access to the entire database and query that way instead
# of using a bind if you don't allow user binding on your server using by="dn"
# and setting dn="cn=admin,..." or similar and dn_cred="password" for the dn.
-auth_ucc = LdapAuthenticator(server="mussel.ucc.asn.au",
+auth_ucc = LDAPAuthenticator(server="mussel.ucc.asn.au",
bind_template="uid=%(id)s,ou=People,dc=ucc,dc=gu,dc=uwa,dc=edu,dc=au")
# The result of the regexp will be passed as kwargs to the authenticator.
@@ -48,10 +50,10 @@ auth_ucc = LdapAuthenticator(server="mus
# several to provide backups (default), or specify authenticate="all" to
# authenticate against them all successfully, or authenticate="any" to try
# them all for validity.
-id_ucc_regexp = re.compile('http://(?P(id)[a-z0-9-_]{5,})\.ucc\.(?:asn|gu\.uwa\.edu)\.au/')
-id_ucc = HttpDomainIdentityProvider(
+id_ucc_regexp = re.compile('http://(?P<id>[a-z0-9-_]{5,})\.ucc\.(?:asn|gu\.uwa\.edu)\.au/')
+id_ucc = HttpIdentityProvider(
id_regexp=id_ucc_regexp,
- authenticator=auth_ldap)
+ authenticator=auth_ucc)
identities.append(id_ucc)
@@ -60,7 +62,7 @@ id_tartarus_regexp = re.compile('http://
auth_tartarus = ImapAuthenticator(server="tartarus.uwa.edu.au")
id_tartarus_regexp = re.compile('http://(?:student|tartarus)\.uwa\.edu\.au/~[a-zA-Z0-9-_]/')
-id_tartarus = HttpDomainIdentityProvider(
+id_tartarus = HttpIdentityProvider(
regexp=id_tartarus_regexp,
authenticator=auth_tartarus)
============================================================
--- uccid/auth/__init__.py ba3a7085b6969117e0989cc158ddcf33da1b403e
+++ uccid/auth/__init__.py 32e8f23bbc307250a0cc91b5b396ad851ced894a
@@ -14,4 +14,6 @@
#from password import *
#from shadow import *
+from ldapauth import LDAPAuthenticator
+
### vi:expandtab:sw=2:ts=2
============================================================
--- uccid/auth/ldapauth.py d6cbaa4659aac710e2bc04a1b078fbea44154cb6
+++ uccid/auth/ldapauth.py 64291692aceba723c5ad3fafebec11f237d54d6d
@@ -6,7 +6,7 @@ from authenticator import Authenticator
import ldap
from authenticator import Authenticator
-class LDAPAuthentication(Authenticator):
+class LDAPAuthenticator(Authenticator):
def __init__(self, server, bind_template):
self.server, self.bind_template = server, bind_template
# NB ldap.init is defined not to do anything network wise until used