Authentication

107 views
Skip to first unread message

Allan Carroll

unread,
Jul 11, 2011, 1:36:08 PM7/11/11
to nowjs
Hi,

I'm wondering what everyone has found to be the best practice for
authenticating Now clients. My first thought is to have the page
renderer insert a token into the Now client object and use it to auth
the user.

Thanks
-Allan

Sridatta Thatipamala

unread,
Jul 11, 2011, 3:32:45 PM7/11/11
to no...@googlegroups.com
This is a fine way of doing it. However, if you are already using a cookie to store a session ID of some sort, you can read the "this.user.cookie" property on the server-side to access this information as a string. (You must parse the string yourself).

Allan Carroll

unread,
Jul 14, 2011, 9:59:19 PM7/14/11
to nowjs
Since we already have a sessions setup, that seems like the most
robust way to go. So, I built a parser and session handler for it.

I'm only seeing this.user.cookie come through on websockets (well, at
least it's not coming through on xhr-polling). Should I expect it over
all transports?

On Jul 11, 12:32 pm, Sridatta Thatipamala <sthatipam...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages