Sessions with haxe remoting

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Sessions with haxe remoting

Blue Sans douze
Hi everyone.

Does someone has a class that can provide a neko serverside sessions, so I make my user login once (using remoting) and have them loggued for further requests ?
I know haXigniter handle that, but it doesn't made for remoting.

I've seen a quite old discussion (2007) between blackdog and Nicolas which talks about this problem, but I think there should be better solutions now : Is there ?

Thanks.
Blue112.

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Sessions with haxe remoting

Dion Whitehead Amago
If you want to use Node.js instead of Neko, you can use the connect
module, which makes that fairly straightforward.  I've added most of
the relevant externs in the nodejs_externs haxelib.

I use the connect module to allow logins via login/password, or google
or facebook oauth.

Dion

On Fri, Jul 22, 2011 at 8:12 AM, Blue Sans douze
<[hidden email]> wrote:

> Hi everyone.
>
> Does someone has a class that can provide a neko serverside sessions, so I
> make my user login once (using remoting) and have them loggued for further
> requests ?
> I know haXigniter handle that, but it doesn't made for remoting.
>
> I've seen a quite old discussion (2007) between blackdog and Nicolas which
> talks about this problem, but I think there should be better solutions now :
> Is there ?
>
> Thanks.
> Blue112.
>
> --
> haXe - an open source web programming language
> http://haxe.org
>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Sessions with haxe remoting

Nicolas Cannasse
In reply to this post by Blue Sans douze
Le 22/07/2011 15:12, Blue Sans douze a écrit :

> Hi everyone.
>
> Does someone has a class that can provide a neko serverside sessions, so
> I make my user login once (using remoting) and have them loggued for
> further requests ?
> I know haXigniter handle that, but it doesn't made for remoting.
>
> I've seen a quite old discussion (2007) between blackdog and Nicolas
> which talks about this problem, but I think there should be better
> solutions now : Is there ?

At Motion-Twin we are storing sessions in a MySQL table and setting a
cookie with an unique SID.

One other possibility is to have the server serialize the session data +
sign-check it using MD5(serialized data + secret key) so the client
can't modify it.

To work with sessions and haXe Remoting you'll have to create a motified
HttpConnection (or another class) that can will the cookie or a special
header for each http request.

Nicolas


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Sessions with haxe remoting

Blue Sans douze
@Dion Thanks, but I don't want to use Nodejs for now, I'm giving a try to neko =)

@Nicolas Ok, thanks, that is what was stated in the 2007 post, I though situation evolved.

Thanks all, I'll make my tests, and then share it into the haXe snippets, so it can help other people.

2011/7/22 Nicolas Cannasse <[hidden email]>
Le 22/07/2011 15:12, Blue Sans douze a écrit :

Hi everyone.

Does someone has a class that can provide a neko serverside sessions, so
I make my user login once (using remoting) and have them loggued for
further requests ?
I know haXigniter handle that, but it doesn't made for remoting.

I've seen a quite old discussion (2007) between blackdog and Nicolas
which talks about this problem, but I think there should be better
solutions now : Is there ?

At Motion-Twin we are storing sessions in a MySQL table and setting a cookie with an unique SID.

One other possibility is to have the server serialize the session data + sign-check it using MD5(serialized data + secret key) so the client can't modify it.

To work with sessions and haXe Remoting you'll have to create a motified HttpConnection (or another class) that can will the cookie or a special header for each http request.

Nicolas


--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org