From a static page, what would be a good way to detect if a user is logged into Gcomm?
Jul 8, 2004, 11:57 AM
Administrator (9387 posts)
Jul 8, 2004, 11:57 AM
Post #2 of 5
Views: 3606
From a static page? You could do some javascript to see if they have a cookie. It's not perfect as you won't be able to authenticate the cookie to make sure it's legit, but you could use it for cosmetic things (like displaying login/logout links, etc).
Cheers,
Alex
--
Gossamer Threads Inc.
Cheers,
Alex
--
Gossamer Threads Inc.
Jul 8, 2004, 12:20 PM
Administrator (9387 posts)
Jul 8, 2004, 12:20 PM
Post #4 of 5
Views: 3590
Hi,
I wouldn't do anything with javascript that needs to be secure, as you have no way of authenticating the session.
If you use SSI then it's not really a static page anymore. =) You could use SSI and do:
<!--#include virtual="/cgi-bin/community.cgi?do=ssi_login"-->
which will print user_ssi_login.html template with <%comm_username%> available if the user is logged in.
Cheers,
Alex
--
Gossamer Threads Inc.
I wouldn't do anything with javascript that needs to be secure, as you have no way of authenticating the session.
If you use SSI then it's not really a static page anymore. =) You could use SSI and do:
<!--#include virtual="/cgi-bin/community.cgi?do=ssi_login"-->
which will print user_ssi_login.html template with <%comm_username%> available if the user is logged in.
Cheers,
Alex
--
Gossamer Threads Inc.