AW: [Zope-dev] Re: [Zope3-Users] How do I automatically login a user

2008-04-03 Thread Roger Ineichen
Ha David 

> Betreff: Re: [Zope-dev] Re: [Zope3-Users] How do I 
> automatically login a user
> 
> Thanks Jim for doing this. Actually, the domain is something 
> I have been looking for also. These other features are really 
> nice. I am hoping this
>   can be worked into something like z3c.authentication for 
> generic use. 
> Hoping roger is following this.

Yes, yes, just found no time to pickup this. But it's on the 
top of my 1000 things to do list ;-)

Note:
I started to make progress with z3c.authenticator.
This will become a replacement for z3c.authentication.simple
Does anybody think we will need a migration script?


Regards
Roger Ineichen
_
END OF MESSAGE

> Regards,
> David
> 
> Jim Fulton wrote:
> > 
> > Let's move this discussion to zope-dev.
> > 
> > On Apr 2, 2008, at 5:36 AM, kevin gill wrote:
> >> Please check in the code to the sandbox and I will have a 
> look at it. 
> >> The coding looks straight-forward, but choosing how to 
> work it into 
> >> the existing  components.
> >>
> >> I will look at the code and come back with questions.
> > 
> > 
> > I just checked 2 files, session.txt and session.py, into
> > 
> >   http://svn.zope.org/Sandbox/J1m/
> > 
> > These provide several features, most of which are of particular 
> > interest
> > here:
> > 
> > - An api to save session credentials independent of login,
> > 
> > - saving sha-encoded passwords,
> > 
> > - logout api
> > 
> > - having an optional additional credential of a user domain,
> >   (probably not of general interest)
> > 
> > Jim
> > 
> > --
> > Jim Fulton
> > Zope Corporation
> > 
> > 
> > ___
> > Zope-Dev maillist  -  [EMAIL PROTECTED] 
> > http://mail.zope.org/mailman/listinfo/zope-dev
> > **  No cross posts or HTML encoding!  ** (Related lists 
> > -http://mail.zope.org/mailman/listinfo/zope-announce
> > http://mail.zope.org/mailman/listinfo/zope )
> > 
> ___
> 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] How do I automatically login a user

2008-04-03 Thread kevin gill

Thanks for that Jim,

The code does what I want. I will have a good look at it and respond on
zope-dev on Tuesday (I only work Tuesday, Wedensdays and Thurday).

Thanks

Kevin


>
> Let's move this discussion to zope-dev.
>
> On Apr 2, 2008, at 5:36 AM, kevin gill wrote:
>> Please check in the code to the sandbox and I will have a look at
>> it. The
>> coding looks straight-forward, but choosing how to work it into the
>> existing  components.
>>
>> I will look at the code and come back with questions.
>
>
> I just checked 2 files, session.txt and session.py, into
>
>http://svn.zope.org/Sandbox/J1m/
>
> These provide several features, most of which are of particular
> interest here:
>
> - An api to save session credentials independent of login,
>
> - saving sha-encoded passwords,
>
> - logout api
>
> - having an optional additional credential of a user domain,
>(probably not of general interest)
>
> Jim
>
> --
> Jim Fulton
> Zope Corporation
>
>
>
> --
> ** Email Scanned by Elive's Virus Scanning Service -
> http://www.elive.net **
>
>
>
>
>



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


Re: [Zope-dev] Re: [Zope3-Users] How do I automatically login a user

2008-04-03 Thread David Pratt
Thanks Jim for doing this. Actually, the domain is something I have been 
looking for also. These other features are really nice. I am hoping this 
 can be worked into something like z3c.authentication for generic use. 
Hoping roger is following this.


Regards,
David

Jim Fulton wrote:


Let's move this discussion to zope-dev.

On Apr 2, 2008, at 5:36 AM, kevin gill wrote:

Please check in the code to the sandbox and I will have a look at it. The
coding looks straight-forward, but choosing how to work it into the
existing  components.

I will look at the code and come back with questions.



I just checked 2 files, session.txt and session.py, into

  http://svn.zope.org/Sandbox/J1m/

These provide several features, most of which are of particular interest 
here:


- An api to save session credentials independent of login,

- saving sha-encoded passwords,

- logout api

- having an optional additional credential of a user domain,
  (probably not of general interest)

Jim

--
Jim Fulton
Zope Corporation


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


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


Re: [Zope3-Users] How do I automatically login a user

2008-04-03 Thread Jim Fulton


On Apr 2, 2008, at 7:02 PM, Darryl Cousins wrote:


Is the code already available for a look? I've played with several
credentials options and would very much like to see what you have  
here.



It is now. Thanks for the reminder. See my response to Kevin.

Jim

--
Jim Fulton
Zope Corporation


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


Re: [Zope3-Users] How do I automatically login a user

2008-04-03 Thread Jim Fulton


Let's move this discussion to zope-dev.

On Apr 2, 2008, at 5:36 AM, kevin gill wrote:
Please check in the code to the sandbox and I will have a look at  
it. The

coding looks straight-forward, but choosing how to work it into the
existing  components.

I will look at the code and come back with questions.



I just checked 2 files, session.txt and session.py, into

  http://svn.zope.org/Sandbox/J1m/

These provide several features, most of which are of particular  
interest here:


- An api to save session credentials independent of login,

- saving sha-encoded passwords,

- logout api

- having an optional additional credential of a user domain,
  (probably not of general interest)

Jim

--
Jim Fulton
Zope Corporation


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


Re: [Zope3-Users] How do I automatically login a user

2008-04-03 Thread Nando Quintana
Hi Kevin,

> During my registration process I want to automatically login the user (in
> Zope3).

After registration, I do the login in the same BrowserPage:

from zope.app.security.interfaces import IAuthentication
from zope.app import zapi

#[...]
# Registration staff
#[...]

# get the principal obj
pau =  zapi.getUtility(IAuthentication)
principal = pau['principals'][login]
principal.id = login
# set it to the request
self.request.setPrincipal(principal)

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: [Zope3-Users] How do I automatically login a user

2008-04-02 Thread Darryl Cousins
On Tue, 2008-04-01 at 12:50 -0400, Jim Fulton wrote:
> On Apr 1, 2008, at 12:33 PM, kevin gill wrote:
> > During my registration process I want to automatically login the  
> > user (in
> > Zope3).
> >
> > I can see how to programatically logout a user using
> > ILogout().logout(request), but I don't see an equivalent for logging  
> > in.
> >
> > I intend to use session cookies for tracking users.
> 
> 
> The most straightforward way is to interact with the session- 
> credentials extractor directly to get it to save credentials for you.  
> Unfortunately, the session-credentials extractor doesn't provide an  
> API to do this.  This would be a worthy addition.  We have an internal  
> session-credential extractor that does this.  I don't have time to  
> work this into the version in zope.app.authentication, but if someone  
> wants to work on this, I'd be happy to check my code into the sandbox  
> for someone to work from.  Note that it also stores sha-encoded  
> credentials. The current credentials extractor stores plain-text  
> passwords in the session data which is extremely lame.


Hi Jim,

Is the code already available for a look? I've played with several
credentials options and would very much like to see what you have here.

Regards,
Darryl


> 
> Jim
> 
> --
> Jim Fulton
> Zope Corporation
> 
> 
> ___
> 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] How do I automatically login a user

2008-04-02 Thread kevin gill
Please check in the code to the sandbox and I will have a look at it. The
coding looks straight-forward, but choosing how to work it into the
existing  components.

I will look at the code and come back with questions.

Thanks

Kevin

>
> On Apr 1, 2008, at 12:33 PM, kevin gill wrote:
>> During my registration process I want to automatically login the
>> user (in
>> Zope3).
>>
>> I can see how to programatically logout a user using
>> ILogout().logout(request), but I don't see an equivalent for logging
>> in.
>>
>> I intend to use session cookies for tracking users.
>
>
> The most straightforward way is to interact with the session-
> credentials extractor directly to get it to save credentials for you.
> Unfortunately, the session-credentials extractor doesn't provide an
> API to do this.  This would be a worthy addition.  We have an internal
> session-credential extractor that does this.  I don't have time to
> work this into the version in zope.app.authentication, but if someone
> wants to work on this, I'd be happy to check my code into the sandbox
> for someone to work from.  Note that it also stores sha-encoded
> credentials. The current credentials extractor stores plain-text
> passwords in the session data which is extremely lame.
>
> Jim
>
> --
> Jim Fulton
> Zope Corporation
>
>
>


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


Re: [Zope3-Users] How do I automatically login a user

2008-04-01 Thread Jim Fulton


On Apr 1, 2008, at 12:33 PM, kevin gill wrote:
During my registration process I want to automatically login the  
user (in

Zope3).

I can see how to programatically logout a user using
ILogout().logout(request), but I don't see an equivalent for logging  
in.


I intend to use session cookies for tracking users.



The most straightforward way is to interact with the session- 
credentials extractor directly to get it to save credentials for you.  
Unfortunately, the session-credentials extractor doesn't provide an  
API to do this.  This would be a worthy addition.  We have an internal  
session-credential extractor that does this.  I don't have time to  
work this into the version in zope.app.authentication, but if someone  
wants to work on this, I'd be happy to check my code into the sandbox  
for someone to work from.  Note that it also stores sha-encoded  
credentials. The current credentials extractor stores plain-text  
passwords in the session data which is extremely lame.


Jim

--
Jim Fulton
Zope Corporation


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