[Zope-PTK] LoginManger Usage (was Re: Status of LoginManager)
John Eikenberry
jae@kavi.com
Tue, 7 Mar 2000 20:09:15 -0800 (PST)
Ok, I've been scanning through LoginManager's sources and the PTK usage of
it trying to figure out how to get it to do what I need. I would like a
second opinion on this, so I'm going to go over what I need and what I
think I need to do with LM to do it.
I'll have a folder (probably the acl_users folder) containing User
Zclasses. With a propertysheet containing the username, passwd, etc. Plus
a few methods for accessing other relevant data.
So the LoginManager will use getUser() to get the User ZClass instance
from this folder and then the User ZClass will handle getting the roles,
domains, etc. Once authenticated, this User ZClass instance will get
placed in the AUTHENTICATED_USER variable to provide access to the methods
on the instance.
Now from what I can tell from the sources, I'm going to need to implement
my own UserSource. Based on the documentation, I shouldn't need to define
rolesForUser(), domainsForUser() and authenticateUser() on my UserSource
as these will be defined on the User ZClass. So it will just need the
getUser() method and mabey a caching system for efficiency.
The handling of passing the requests for roles, domains and authentication
will automatically be passed though to the User ZClass. And the User
ZClass instance will automatically be put into the AUTHENTICATED_USER
variable... right?
Does this all sound right? Am I overlooking something or making this too
hard.
Thanks.
---
John Eikenberry
[jae@kavi.com - http://zhar.net/]
______________________________________________________________
"A society that will trade a little liberty for a little order
will deserve neither and lose both."
--B. Franklin