summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-03-21 12:39:30 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-03-21 12:39:30 -0700
commit610e83f3d6654d2fe95c20cf2280f7d894ac58f8 (patch)
treec01489dff29bc0a61f6b528041a18091e9302810
parent67293865420f1831f6ef8d9af78d6384b0e8675a (diff)
downloadtamarind-610e83f3d6654d2fe95c20cf2280f7d894ac58f8.tar.gz
tamarind-610e83f3d6654d2fe95c20cf2280f7d894ac58f8.tar.bz2
tamarind-610e83f3d6654d2fe95c20cf2280f7d894ac58f8.zip
Handle auth in authenticated state.
This can happen if the user hits the back button and re-submits authentication. In that case it appears as if user name or password will work. Let's generate an error screen for that case to inform the user what is going on.
-rwxr-xr-xmain.txr3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.txr b/main.txr
index 35ec80f..cb58078 100755
--- a/main.txr
+++ b/main.txr
@@ -25,6 +25,9 @@ REMOTE_ADDR=@clientip
@(if session-valid-p)
@ (skip)
@ (cases)
+QUERY_STRING=auth
+@ (error-form "Redundant Authentication" "You are already logged in")
+@ (or)
QUERY_STRING=logout
@ (remove-session cookie-userid)
@ (login-form "Logged out; you may log in again.")