[Paste] Re: AuthCookieSigner, AuthCookieEnviron docmentation…

Top Page
Author: Ian Bicking
Date:  
To: SavageS
CC: Paste Users
Subject: [Paste] Re: AuthCookieSigner, AuthCookieEnviron docmentation, Ugh
Those are funny modules. If you wrap your application in
paste.auth.cookie.AuthCookieHandler, you can simply set
environ['REMOTE_USER'] and it'll set the cookie, and restore the environ
value on subsequent requests.

There's no sessions, just signed cookies. AuthCookieHandler takes some
parameters that do what you want.

On Mon, Jul 6, 2009 at 5:04 PM, SavageS <shaun.savage@???> wrote:

>
> I am try to add paste.cookies to my system. I do not understand how
> AuthCookieSigner and AuthCookieEnviron works. I am porting a
> application for apache2/mod_python to lighttpd/wsgi.
>
> guess code
> ---------
>
> from paste.auth.cookie import AuthCookieSigner, AuthCookieEnviron
>
> al = AuthCookieEnviron()
> al.append( {'user':user, 'session': session})
> sc = AuthCookieSigner( secret='secret')
> cookie = sc.sign( al )
> ..... add cookie to response
>
>
> where do you set the name of the cookie?
> How do you verify the cookie in the next sonnection?
> How do session work? ( this will be asked later when I get to it)
> session have a cookie name, also later
>
> shaun
>
>
>
> >
>



-- 
Ian Bicking  |  http://blog.ianbicking.org  |
http://topplabs.org/civichacker

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Paste Users" group.
To post to this group, send email to paste-users@???
To unsubscribe from this group, send email to paste-users+unsubscribe@???
For more options, visit this group at http://groups.google.com/group/paste-users?hl=en
-~----------~----~----~----~------~----~------~--~---