]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn
response
[ikiwiki.git] / doc / forum / appear_if_you_are_login_or_not_in_a_page.mdwn
index 5ebde2cced75d1d47f82fae33efcde7e4e198798..239f78f5dd98cd7a0f34a1c5c587b59119ccb68d 100644 (file)
@@ -12,3 +12,18 @@ Xan.
 > generated HTML pages to get run through the PHP interpreter. The trick
 > would work differently with other [[plugins/type/auth]] plugins,
 > if at all. --[[Schmonz]]
+
+>> Thanks a lot, Xan.
+
+>>> Another possible trick would be to use some Javascript to make a
+>>> "who am I?" AJAX request to the CGI (the CGI would receive the
+>>> session cookie, if any, and be able to answer). Obviously, this
+>>> wouldn't work for users who've disabled Javascript, but since it's
+>>> non-essential, that's not so bad. You'd need to
+>>> [[write_a_plugin|plugins/write]] to add a suitable CGI action,
+>>> perhaps ?do=whoami, and insert the Javascript. --[[smcv]]
+
+>>>> Cool idea. A similar trick (I first saw it
+>>>> [here](http://www.peej.co.uk/articles/http-auth-with-html-forms.html))
+>>>> could be used to provide a [[plugins/passwordauth]]-like login form
+>>>> for [[plugins/httpauth]].