Removed parts of OpenID from the traditional login screen
authorArt Cancro <ajc@citadel.org>
Tue, 11 Jan 2011 16:56:28 +0000 (11:56 -0500)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 13:54:26 +0000 (13:54 +0000)
webcit/auth.c
webcit/static/t/openid_login.html [deleted file]

index 6d5d75706529e5713dbc215adf5b2dd5f87afc90..40d12c9a1a970dd74eaa60c9da1ca5a930a2aed8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * These functions handle authentication of users to a Citadel server.
  *
- * Copyright (c) 1996-2010 by the citadel.org team
+ * Copyright (c) 1996-2011 by the citadel.org team
  *
  * This program is open source software.  You can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -73,20 +73,6 @@ void display_login(void)
 
 
 
-/* 
- * Display the openid-enabled login screen
- * mesg = the error message if last attempt failed.
- */
-void display_openid_login(char *mesg)
-{
-  begin_burst();
-  output_headers(1, 0, 0, 0, 1, 0);
-  do_template("openid_login", NULL);
-  end_burst();
-}
-
-
-
 
 /* Initialize the session
  *
@@ -352,13 +338,13 @@ void do_openid_login(void)
                        return;
                }
                else {
-                       display_openid_login(&buf[4]);
+                       display_login();
                        return;
                }
        }
 
        /* If we get to this point then something failed. */
-       display_openid_login(_("Your password was not accepted."));
+       display_login();
 }
 
 /* 
@@ -471,7 +457,7 @@ void finalize_openid_login(void)
                        do_welcome();
                }
        } else {
-               display_openid_login(_("Your password was not accepted."));
+               display_login();
        }
 
        FreeStrBuf(&result);
@@ -954,10 +940,6 @@ int ConditionalIsLoggedIn(StrBuf *Target, WCTemplputParams *TP)
 }
 
 
-void _display_openid_login(void) {
-       display_openid_login(NULL);
-}
-
 
 void _display_reg(void) {
        display_reg(0);
@@ -1069,22 +1051,24 @@ InitModule_AUTH
        RegisterHeaderHandler(HKEY("COOKIE"), Header_HandleCookie);
        RegisterHeaderHandler(HKEY("AUTHORIZATION"), Header_HandleAuth);
 
-       WebcitAddUrlHandler(HKEY(""), "", 0, do_welcome, ANONYMOUS|COOKIEUNNEEDED); /* no url pattern at all? Show login. */
+       /* no url pattern at all? Show login. */
+       WebcitAddUrlHandler(HKEY(""), "", 0, do_welcome, ANONYMOUS|COOKIEUNNEEDED);
+
+       /* some of these will be removed soon */
        WebcitAddUrlHandler(HKEY("do_welcome"), "", 0, do_welcome, ANONYMOUS|COOKIEUNNEEDED);
        WebcitAddUrlHandler(HKEY("login"), "", 0, do_login, ANONYMOUS|COOKIEUNNEEDED);
-       WebcitAddUrlHandler(HKEY("display_openid_login"), "", 0, _display_openid_login, ANONYMOUS);
        WebcitAddUrlHandler(HKEY("openid_login"), "", 0, do_openid_login, ANONYMOUS);
        WebcitAddUrlHandler(HKEY("finalize_openid_login"), "", 0, finalize_openid_login, ANONYMOUS);
        WebcitAddUrlHandler(HKEY("openid_manual_create"), "", 0, openid_manual_create, ANONYMOUS);
-       WebcitAddUrlHandler(HKEY("do_logout"), "", 0, do_logout, ANONYMOUS|COOKIEUNNEEDED|FORCE_SESSIONCLOSE);
-       WebcitAddUrlHandler(HKEY("ajax_login_username_password"), "", 0, ajax_login_username_password, AJAX|ANONYMOUS);
        WebcitAddUrlHandler(HKEY("validate"), "", 0, validate, 0);
        WebcitAddUrlHandler(HKEY("do_welcome"), "", 0, do_welcome, 0);
        WebcitAddUrlHandler(HKEY("display_reg"), "", 0, _display_reg, 0);
        WebcitAddUrlHandler(HKEY("display_changepw"), "", 0, display_changepw, 0);
        WebcitAddUrlHandler(HKEY("changepw"), "", 0, changepw, 0);
        WebcitAddUrlHandler(HKEY("termquit"), "", 0, do_logout, 0);
-
+       WebcitAddUrlHandler(HKEY("do_logout"), "", 0, do_logout, ANONYMOUS|COOKIEUNNEEDED|FORCE_SESSIONCLOSE);
+       WebcitAddUrlHandler(HKEY("ajax_login_username_password"), "", 0,
+               ajax_login_username_password, AJAX|ANONYMOUS);
 
        RegisterConditional(HKEY("COND:AIDE"), 2, ConditionalAide, CTX_NONE);
        RegisterConditional(HKEY("COND:LOGGEDIN"), 2, ConditionalIsLoggedIn, CTX_NONE);
diff --git a/webcit/static/t/openid_login.html b/webcit/static/t/openid_login.html
deleted file mode 100644 (file)
index 7902590..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?=("head")>
-<!-- start openid_login.html -->
-<div id="login_screen">
-<div class="box">
-<div class="boxlabel"><?SERV:HUMANNODE> - <?_("powered by")> <a href="http://www.citadel.org">Citadel</a></div>
-<div class="boxcontent">
-<div id="hellomsg">
-<?SERV:MESG("hello")>
-</div>
-<?!("COND:IMPMSG", 1)>
-<div class="login_message"><?IMPORTANTMESSAGE></div>
-<?!("X", 1)>
-<div class="login_image"><img src="image?name=hello" alt=""></div>
-<form action="openid_login" method="POST"  class="box" id="login_form">
-<div>
-        <label for="openid_url"><?_("OpenID URL:")></label>
-        <input type="text" name="openid_url" id="openid_url" class="openid_urlarea" > <br>
-        <label for="lname"><?_("Language:")></label>
-        <?LANG:SELECT> <br>
-</div>
-        <div class="logbuttons">
-        <input type="submit" name="login_action" value="<?_("Log in")>"   class="logbutton">
-        <input type="submit" name="exit_action" value="<?_("Exit")>"  class="logbutton">
-        <br>
-        </div>
-</form>
-<div id="convlogin">
-  <p><a href="display_login"><?_("Log in using a user name and password")></a></p>
-  </div>
-<div class="login_infos">
-<ul><li><?_("Enter your OpenID URL and click &quot;Log in&quot;.")></li>
-<li><a href="http://www.citadel.org/doku.php/documentation:openid">
-<?_("Click here to learn what OpenID is and how Citadel is using it.")></a></li>
-<li><?_("Please log off properly when finished. ")></li>
-<li><?_("See the")> <a href="http://www.citadel.org/doku.php/faq:everydayuse:webcit_browser"><?_("recommended browser list")></a> <?_("if you have trouble using Webcit.</li> <li>You must have <i>cookies</i> turned on. ")></li>
-<li><?_("Also keep in mind that if your browser is configured to block pop-up windows, you will not be able to receive any instant messages.")></li></ul>
-</div>
-</div>
-<!-- end login.html -->
-<?=("endbox")>
-<?=("trailing")>