On Jul 10, 5:32 pm, Ben Bangert <[EMAIL PROTECTED]> wrote:
> On Jul 10, 2007, at 12:07 PM, michael wrote:
>
> > I wanted to try out the open_id authentication on a local application.
> > I think I got all the config variable names right.
>
> > snip from development.ini:
> >    authkit.setup.enable = true
> >    authkit.setup.method = openid
> >    authkit.cookie.secret = somesecret
> >    authkit.openid.store.type = file
> >    authkit.openid.store.config = ""
> >    authkit.openid.path.signedin = '/signedin'
> >    authkit.openid.baseurl =http://127.0.0.1:5000
>
> I think you need to add usage of the cookie to that like so:
>         authkit.setup.method = openid, cookie

ah, that was it.  Thank you, sir.

> So that it then add's the cookie wrapper, which should make the
> paste.auth_tkt.set_user function available. This should fix the
> problem you're seeing. I'll look into adding some better error
> handling so it lets you know about this as well.
>
> On a side-note, I hope to be updating AuthKit's OpenID soon to use
> the latest OpenID 2.0 libraries from JanRain.

Hey, thanks for all the work on AuthKit.  I am slowly learning what
can be done with it.. and it is pretty cool.

> Cheers,
> Ben
>
>  smime.p7s
> 3KDownload

But, related to this thread.. Once I got open_id working, I decided
to
try forward with the added cookie method.  I regret to report that I
got a new error.

Here is the 'Error Traceback':
Module authkit.authenticate.cookie:209 in calculate_digest
exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0x94 \
    in position 5: ordinal not in range(128)

Here are the debug log specifics:
DEBUG MOD: cookie NAME: authkit.authenticate.cookie
    calculate_digest(ip='127.0.0.1', timestamp=1184108278.6443119,
        secret='secret', userid=u'genoverly', tokens='', user_data='')
DEBUG MOD: cookie NAME: authkit.authenticate.cookie
    encode_ip_timestamp(ip='127.0.0.1', timestamp=1184108278.6443119)

It did not take long to figure out that the username is unicode.  I
isolated the functions and solved the problem on the python command
line by taking out the 'u'.

I thought maybe I was passing it that way so tried to
username.decode("ascii") before calling
request.environ['paste.auth_tkt.set_user'](username). did not work.

I realize that not all usernames will be ascii, so I am raising the
issue.

--
michael


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to