--- "Morten W. Petersen" <[EMAIL PROTECTED]> wrote:
> [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 []
> 
> 


Hmmm, I tried implementing these functions before,
but only as DTML methods:

userAuthenticate 
<dtml-return "_.int('1')">
              
userDomains 
<dtml-return "['']">
        
userExists 
<dtml-return "_.int('1')">
        
userRoles 
<dtml-return "['Manager']">


Yet this never seemed to work.  Does it not
work because they are DTMLMethods and not External
Methods, or because I am returning the wrong
values, or because of a proxy or security setting?

The Methods are in the User Sources 'folder' and
I am sure I chose "GUF" authentication from the
list when I added the LoginManager.

Jason

__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.
http://im.yahoo.com/

_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to