Re: [Zope] LoginManager 0.8.8b1 examples/suggestions?

2000-10-25 Thread Jason Byron

--- "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 

  
userDomains 


userExists 


userRoles 



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 )




Re: [Zope] LoginManager 0.8.8b1 examples/suggestions?

2000-10-24 Thread Morten W. Petersen

[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

___
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 )