From d1592be24041ff9e5b8185885ce42c17cf11a983 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sat, 25 Feb 2012 23:35:11 +0100 Subject: Make the OpenID login page fancier and easier to use. --- src/mulk/benki/auth.clj | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mulk/benki/auth.clj b/src/mulk/benki/auth.clj index 9c5767d..5333269 100644 --- a/src/mulk/benki/auth.clj +++ b/src/mulk/benki/auth.clj @@ -67,10 +67,21 @@ (session/put! :discovered discovered) (redirect (.getDestinationUrl authreq true)))) +(def login-page-layout + {:head (list + [:link {:type "text/css", :rel "stylesheet", :href "/3rdparty/openid-selector/css/openid.css"}] + [:script {:type "text/javascript", :src "/3rdparty/openid-selector/js/openid-jquery.js"}] + [:script {:type "text/javascript", :src "/3rdparty/openid-selector/js/openid-en.js"}] + [:script {:type "text/javascript", :src "/js/openid-login.js"}] + )}) + (defpage "/login" [] - (layout "Benki Login" - [:p "Please enter your OpenID:"] + (layout login-page-layout "Benki Login" [:form {:action (resolve-uri "/login/authenticate"), :method "GET"} - [:input {:type "text", :name "openid"}] - [:input {:type "submit"}]])) + [:div {:id "openid_choice"} + [:p "Please select your OpenID provider:"] + [:div {:id "openid_btns"}]] + [:div {:id "openid_input_area"} + [:input {:type "text", :name "openid", :id "openid_identifier"}] + [:input {:type "submit"}]]])) -- cgit v1.2.3