X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fstatic%2Fauthmethods.js;h=1ea70c00de969628ba684e55edd76a3aceb96d83;hb=91d14cf3c8874cf7d08b542e090b5eff2bc4208f;hp=4bb117c61754347bfae5336af1268757eb1e7ea0;hpb=1e9a531664c3b673dbcc2f282b2ed9c7aa33266b;p=citadel.git diff --git a/webcit/static/authmethods.js b/webcit/static/authmethods.js index 4bb117c61..1ea70c00d 100644 --- a/webcit/static/authmethods.js +++ b/webcit/static/authmethods.js @@ -91,3 +91,23 @@ function authtoggle(show_which_div) { $('authbox_openid').style.display = 'none'; $(show_which_div).style.display = 'block'; } + + +/* + * Pop out a window for external auth methods + * (most of them don't handle inline auth very well) + */ +function do_auth_popout(popout_url) { + window.open(popout_url, "authpopout", "status=1,toolbar=0,width=600,height=400"); +} + + +/* + * Attempt login with OpenID, called from modal dialog + */ +function ajax_try_openid() { + $('login_errmsg').innerHTML = ""; + openid_url = encodeURI($('ajax_openid_form').elements["openid_url"].value); + do_auth_popout("openid_login?openid_url=" + openid_url); +} +