From ad997b56ffb5979af4c7a951590e8e0648e28d5b Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 1 Dec 2011 15:16:24 -0500 Subject: [PATCH] Support Google and Yahoo login without the user needing to know that OpenID is in use. --- webcit/static/authmethods.js | 26 ++++++++++++++++++++++++++ webcit/static/t/get_logged_in.html | 25 ++++++++++++++++++++----- 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/webcit/static/authmethods.js b/webcit/static/authmethods.js index 3362a5185..85e9626db 100644 --- a/webcit/static/authmethods.js +++ b/webcit/static/authmethods.js @@ -58,6 +58,8 @@ function authtoggle(show_which_div) { $('authbox_userpass').style.display = 'none'; $('authbox_newuser').style.display = 'none'; $('authbox_openid').style.display = 'none'; + $('authbox_google').style.display = 'none'; + $('authbox_yahoo').style.display = 'none'; $(show_which_div).style.display = 'block'; } @@ -182,3 +184,27 @@ function openid_onkeypress(e) { } +/****************** GOOGLE ***********************/ + +/* + * Attempt login with Google, called from modal dialog + */ +function ajax_try_google() { + $('login_errmsg').innerHTML = ""; + openid_url = encodeURI("https://www.google.com/accounts/o8/id"); + do_auth_popout("openid_login?openid_url=" + openid_url); +} + + +/****************** GOOGLE ***********************/ + +/* + * Attempt login with Google, called from modal dialog + */ +function ajax_try_yahoo() { + $('login_errmsg').innerHTML = ""; + openid_url = encodeURI("http://yahoo.com"); + do_auth_popout("openid_login?openid_url=" + openid_url); +} + + diff --git a/webcit/static/t/get_logged_in.html b/webcit/static/t/get_logged_in.html index c2e7b89ed..95f49d2f9 100644 --- a/webcit/static/t/get_logged_in.html +++ b/webcit/static/t/get_logged_in.html @@ -23,13 +23,18 @@ OpenID + - -
  • -
  • +
  • + + Google +
  • -
  • -
  • +
  • + + Yahoo + +
  • @@ -78,6 +83,16 @@
    + + + + -- 2.30.2