I think you need to set the user like so ->
# name = the user login name.
request.environ['paste.auth_tkt.set_user'](name)
Here's the documentation for that...
``environ['paste.auth_tkt.set_user'](userid, tokens='',
user_data='')``
This sets a cookie that logs the user in. ``tokens`` is a
string (comma-separated groups) or a list of strings.
``user_data`` is a string for your own use.
FWIW, I found this a bit confusing too...
jw
On Sep 13, 6:00 pm, "Matt Feifarek" <[EMAIL PROTECTED]> wrote:
> I'm struggling trying to get this to work and hoping for some help.
>
> The relevant portions of the PylonsBook don't seem to be written yet, and
> wiki-based examples don't even have the same config syntax configuration
> spec.
>
> The source code examples in svn trunk (which aren't in 0.4.0 btw) are not
> pylons examples, simply low-level WSGI scripts, and are therefore too
> different for my addled brain to map well to pylons.
>
> Here's the closest that I have so far:
>
> In my config, I have this:
> authkit.enable = true
> authkit.setup.method = forward, cookie
> authkit.cookie.signoutpath = /authkit_test/signout
> authkit.cookie.secret = secret string
> authkit.forward.internalpath = /authkit_test/signin
> authkit.forward.authenticate.user.data = guest:foobar
>
> Which gives me an error: """AuthKitConfigError: No authkit.users object
> exists in the environment. You may have forgotton to specify a Users object
> or are using the the default valid_password() method in the authenticate
> middleware when you may have meant to specify your own."""
>
> That's over my head, I'm afraid.
>
> I also tried following these
> docs:http://wiki.pylonshq.com/display/authkitcookbook/AuthKit+Authenticati...
>
> The Form doc mentions being able to override the template with a string or a
> file. I can't seem to get that working either; authkit seems to want to sent
> its own form (which is wrapped in an error page, by the way).
>
> If anyone has a working (or semi-working) example, I'd really appreciate it.
>
> Thanks!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---