Hi. Is there any way to manually sign in a user using AuthKit with Pylons?
Here's the problem I'm facing: 1) user is presented with standard login form (username+password) that has some additional fields 2) when user is already in database I want to authenticate him (this is nicely done by AuthKit) and process data from additional fields in my action 3) when user is not in database I want to: * add him to DB ('user_create' to be used from AuthKit SQLAlchemy driver) * sign him in (this is the part I'm asking about) * process additional data * all of the above done in one action method (the reason for that is that user won't see many page reloads before all processing is done; maybe there's some other way to achieve that: I've just spotted 'forward' in 'pylons.controllers.util' but I don't know whether this could be used in my situation) I want to solve the above problem the Pylons-way, that's why I'm writing (maybe there's some kind of idiom for this). I've spotted place where AuthKit updates 'REMOTE_USER' [1], so I guess I could just copy-paste it into my action method. I assume going down this way I should also find the code that updates 'authkit' cookie (to do exactly what AuthKit does) and paste it also into my action. Somehow I don't feel this is the right way to do this. My authkit-related config (I use 'cookie' and 'form' method): authkit.setup.enable = true authkit.setup.method = form, cookie authkit.form.authenticate.user.type = authkit.users.sqlalchemy_driver:UsersFromDatabase authkit.form.authenticate.user.data = myapp.model authkit.cookie.secret = some_privy_secret authkit.cookie.signoutpath = /signout Thanks for answers in advance :) [1] http://authkit.org/trac/browser/AuthKit/trunk/authkit/authenticate/form.py?#L84 -- Regards, Mateusz Biliński --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---