[Zope] LoginManager 0.8.8b1 examples/suggestions?
Morten W. Petersen
morten@esol.no
25 Oct 2000 07:59:09 +0200
[Jason Byron]
| Does anyone have any LoginManager 0.8.8b1 example
| code? It almost looks like you can extend the system
| using plugins, but I don't know how that's done.
| Anyone else have luck doing this? If so then do you
| have any examples/suggestions?
Yes. After adding your LoginManager instance, you should add four
methods of some sort within the UserSource object.
The four methods are:
userAuthenticate
userExists
userRoles
userDomains
Here's the External methods I used just to make the logins work; you'll
have to implement them to fit your system:
def userAuthenticate(self, REQUEST, username, password):
if username == 'morten' and password == 'morten':
return 1
else:
return 0
def userExists(self, REQUEST, username):
return 1
def userRoles(self, REQUEST, username):
return 'Manager', 'Owner'
def userDomains(self, REQUEST, username):
return []
| All I want is a simple ZODB/cookie based system, but I
| can't get the Generic User Source to work.
HTH then. =)
-Morten