Take care! You will be responsible for all the data traffic from your form
to the function.

Create an action which receives request.args (post) and deal with login bare
function. I have a running app but I cant share the code now. I will send it
later.

http://zerp.ly/rochacbruno
Em 28/09/2011 06:29, "Marek Mollin" <rog...@gmail.com> escreveu:
> Good man!
> Thank a lot, its also undocumented in the book ;]
>
> On Sep 28, 11:24 am, Bruno Rocha <rochacbr...@gmail.com> wrote:
>> I use auth.login_bare function. Just post user and password to it. It
will
>> do the rest of the job.
>>
>> http://zerp.ly/rochacbruno
>> Em 28/09/2011 06:15, "Marek Mollin" <rog...@gmail.com> escreveu:
>>
>>
>>
>>
>>
>>
>>
>> > Hello,
>>
>> > I am wondering how to properly do an ajax login. I will be doing the
>> > whole thing with jquery ajax. I use it for a lot of stuff, I hav ajax
>> > controller that handles getting data from models and returns jsons. It
>> > works just fine...
>>
>> > Yet when it comes to login, the whole auth seems to me to be too
>> > closely coupled with view.
>> > What I would like to have is function in my ajax controller. Named
>> > login it would take from request.vars.login, request.vars.password.
>> > Then I would just fire up auth.login(request.vars.login,
>> > request.vars.password) and I am logged.
>>
>> > Do I have to go all the way to getting a user from database, hashing a
>> > password, and checking if its ok, than manually adding session.vars?

Reply via email to