Thank you Jeremy.
My bookmarklet can't post data due to crossdomain restriction, I can
only send GET requests with jsonp, so I've writed some code like this:
$this->data->["User"]["username"] = $this->request->query["username"];
(some for password) and then passed $this->data to $this->Auth-
>logi
There's nothing really out of the ordinary going on here, it's basic Cake
stuff.
Your ajax form should POST the data to /users/login. Then your controller
action can look something like:
public function login() {
if ($this->Auth->login($this->data) {
// set flash
// set user data via $this->Aut
I know this tutorial and coded for learning cake, but there is a lot
of magic under $this->Auth->login, what I need is to understand of can
I use username and password retrieved from $this->request to identify
an user and return user ID to make some business logic...
Thank you anyway for your resp
http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html
--
Lep pozdrav, Tilen Majerle
http://majerle.eu
2012/2/26 @dariobarila
> Hi all,
> I'm developing a bookmarklet for social shopping, I need to let user
> to authenticate trough my bookmarklet via ajax, my idea i
Hi all,
I'm developing a bookmarklet for social shopping, I need to let user
to authenticate trough my bookmarklet via ajax, my idea is to send to
my cakeapp username & password and with a cookie on the browser store
a session after cake has authenticated the user.
I've tried to grab username & ps