Saturday, 31 August 2013

How deal with 3rd party login information on a static website hosted with nginx?

How deal with 3rd party login information on a static website hosted with
nginx?

I do have a static website which has public access but I do want to
implement a smart page that can take advantage of getting the logged
username from another application from the same domain.
Users can login to /auth/ and when logged in the resulted page returns the
username as part of the HTTP response-headers.
I want to be able to detect if the user is logged in and to change the
current page a little bit with jQuery.
I guess that this would require me to have a json request each time so I
can check if the user is logged-in or not and to to my logic after.
Is there any other better option? … preferably one that would not make two
requests to the server for each login-enabled page.

No comments:

Post a Comment