Vedr. Re: [Zope3-Users] Authentication howto

2007-06-15 Thread Torvald Bringsvor
Thanks guys. I'm now back to liking the framework
again :-))

-Torvald




--- Baiju M [EMAIL PROTECTED] skrev:

 Christophe Combelles wrote:
  Since this is the third time I see this question,
 I've pasted it on 
  the FAQ.
 

http://wiki.zope.org/zope3/FAQ#i-want-to-quickly-setup-authentication-with-users-and-permissions
 
 
 
  Feel free to review and correct what I wrote
 
 I have just changed the question :

http://wiki.zope.org/zope3/FAQ#how-to-setup-authentication-with-users-and-permissions
 
 Feel free to edit FAQ questions and answers !
 
 I think FAQ and other wiki pages requires some
 attention from users.
 It's no more a framework developer only wiki, it's
 for all (administrators,
 developers and framework developers)
 
 Regards,
 Baiju M
 
 ___
 Zope3-users mailing list
 Zope3-users@zope.org
 http://mail.zope.org/mailman/listinfo/zope3-users
 

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Authentication howto

2007-06-14 Thread Baiju M

Christophe Combelles wrote:
Since this is the third time I see this question, I've pasted it on 
the FAQ.
http://wiki.zope.org/zope3/FAQ#i-want-to-quickly-setup-authentication-with-users-and-permissions 



Feel free to review and correct what I wrote


I have just changed the question :
http://wiki.zope.org/zope3/FAQ#how-to-setup-authentication-with-users-and-permissions

Feel free to edit FAQ questions and answers !

I think FAQ and other wiki pages requires some attention from users.
It's no more a framework developer only wiki, it's for all (administrators,
developers and framework developers)

Regards,
Baiju M

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Authentication howto

2007-06-12 Thread Nando Quintana
Hi Torvald,

I recommend you Philips,s zope3 book and specialy the security charpters
that explain the zope3 auth mechanics widely.

Here you are some notes about how to implement a user management
system...

1) First of all you have to create and register a PAU Utillity in your
siteManager. Read this code snippet:
kelpi.com/script/9141b4
as you can see there, you have to handle the after creation event to
create and register the pau utility.

2) The credentials are managed by the CookieCredentialsPlugin written by
Philipp V. W. See:
kelpi.com/script/c1c9a3

3) Here you have an example of a view for signing up proposals:
kelpi.com/script/e2019a

4) In this example:
kelpi.com/script/f49219
you can see an adapter that allows you to register a new user withing
the user folder in PAU.

If you need more lines of code or any other explanation, just tell me...

Bye,
Nando.

-- 
http://www.nandoquintana.com/contact


signature.asc
Description: Esta parte del mensaje está firmada	digitalmente
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: Vedr. Re: [Zope3-Users] Authentication howto

2007-06-12 Thread Nando Quintana
Hi,

I've uploaded you another piece of code:
kelpi.com/script/c880ba

There you have a view to handle login action. when auth is required zope
redirects you to /loginForm.html I redirect then to /login where I
prompt the user asking for user/pass.

In this zcml:
kelpi.com/script/fa9196

you can see the registration of some of the views that participates in
the sign up /login dance.

If you want to see all this code running:
http://trac.kelpi.com/browser/trunk/kelpi

this is the source code of kelpi.com

Take a look at it...

Bye,
Nando.


El mar, 12-06-2007 a las 00:08 +0200, Torvald Bringsvor escribió:
 Thanks for the samples you provided. Question: do you
 have any more samples on setting up for example a
 custom login screen (also with zcml code)?
 

-- 
http://www.nandoquintana.com/contact


signature.asc
Description: Esta parte del mensaje está firmada	digitalmente
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: Vedr. Re: [Zope3-Users] Authentication howto

2007-06-12 Thread Christophe Combelles

I didn't know kelpi.com, that's a nice example of zope3 app !!
I guess this hasn't been online for a long time?

I've quickly looked at the code, and I have a question:
what's the purpose of MyIntIds compared to the base IntIds?
Is this some optimisation?

Christophe


Nando Quintana a écrit :

Hi,

I've uploaded you another piece of code:
kelpi.com/script/c880ba

There you have a view to handle login action. when auth is required zope
redirects you to /loginForm.html I redirect then to /login where I
prompt the user asking for user/pass.

In this zcml:
kelpi.com/script/fa9196

you can see the registration of some of the views that participates in
the sign up /login dance.

If you want to see all this code running:
http://trac.kelpi.com/browser/trunk/kelpi

this is the source code of kelpi.com

Take a look at it...

Bye,
Nando.


El mar, 12-06-2007 a las 00:08 +0200, Torvald Bringsvor escribió:

Thanks for the samples you provided. Question: do you
have any more samples on setting up for example a
custom login screen (also with zcml code)?






___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Authentication howto

2007-06-11 Thread Christophe Combelles
The first and simple way to add authentication and users via the ZMI is the 
following :


- go to the site manager (in the root, or in your folder/site)
- add a Pluggable Authentication Utility (name as you want, prefix empty)
- enter it
- activate no challenge if auth and session credentials in this order
- add a Principal Folder (name and prefix as you want)
- return back to the PAU, and activate your Principal Folder
- Now, register both the PAU and the Principal Folder


The same thing made automatically from an event subscriber when my site is added 
into the ZMI gives the following:


def initial_setup(site):
sm = site.getSiteManager()
# create and register the PAU (Pluggable Auth Utility)
pau = PluggableAuthentication()
sm['authentication'] = pau
sm.registerUtility(pau, IAuthentication)
# and the auth plugin
users = EztranetUsersContainer()
sm['authentication']['EztranetUsers'] = users
sm.registerUtility(users, IAuthenticatorPlugin, name=EztranetUsers)
# activate the auth plugins in the pau
pau.authenticatorPlugins = (users.__name__, ) # a tuple with one element
#activate the wanted credential plugins
pau.credentialsPlugins = ( No Challenge if Authenticated, Session 
Credentials )


EztranetUsersContainer() is just a derived PrincipalFolder()
because I wanted to have a custom container with custom users and a custom 
template.


Christophe


Torvald Bringsvor a écrit :

Hi

I'm a Zope newbie (kind of), and I've read the von
Weitershausen book. However I'm having trouble
following the authentication stuff.

My situation:
I need a kind of teaspoon HOWTO on how to add
authentication to the application I'm writing. I want
show unauthenticated users a simple username/password
form, using a session to remember them.

It seems every example I come across wants to do
something mega-complicated, giving me the feeling that
this will be loads of work. Does it need to be?

-Torvald

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users




___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users