diff options
author | Byron Jones <bjones@mozilla.com> | 2013-07-24 19:12:35 +0200 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2013-07-24 19:12:35 +0200 |
commit | 23dcf429e71dfb5301c32b42dc40e5a47d11ed98 (patch) | |
tree | fa6b93f7a05e289c77d2619bf42af8e04081a3d9 /extensions | |
parent | 929b49c3e8e5720b750cb35fe27d2d79744a3589 (diff) | |
download | bugzilla-23dcf429e71dfb5301c32b42dc40e5a47d11ed98.tar.gz bugzilla-23dcf429e71dfb5301c32b42dc40e5a47d11ed98.tar.xz |
Bug 897512: add support for proxies to the persona extension
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/Persona/lib/Config.pm | 7 | ||||
-rw-r--r-- | extensions/Persona/lib/Login.pm | 3 | ||||
-rw-r--r-- | extensions/Persona/template/en/default/admin/params/persona.html.tmpl | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/extensions/Persona/lib/Config.pm b/extensions/Persona/lib/Config.pm index 99c547b16..9c483cb51 100644 --- a/extensions/Persona/lib/Config.pm +++ b/extensions/Persona/lib/Config.pm @@ -27,7 +27,12 @@ sub get_param_list { name => 'persona_includejs_url', type => 't', default => 'https://login.persona.org/include.js', - } + }, + { + name => 'persona_proxy_url', + type => 't', + default => '', + }, ); return @param_list; diff --git a/extensions/Persona/lib/Login.pm b/extensions/Persona/lib/Login.pm index 62fca4d50..ece92a3c0 100644 --- a/extensions/Persona/lib/Login.pm +++ b/extensions/Persona/lib/Login.pm @@ -43,6 +43,9 @@ sub get_login_info { my $audience = $urlbase->scheme . "://" . $urlbase->host_port; my $ua = new LWP::UserAgent( timeout => 10 ); + if (Bugzilla->params->{persona_proxy_url}) { + $ua->proxy('https', Bugzilla->params->{persona_proxy_url}); + } my $response = $ua->post(Bugzilla->params->{persona_verify_url}, [ assertion => $assertion, diff --git a/extensions/Persona/template/en/default/admin/params/persona.html.tmpl b/extensions/Persona/template/en/default/admin/params/persona.html.tmpl index 5c060129b..ef3cf32d2 100644 --- a/extensions/Persona/template/en/default/admin/params/persona.html.tmpl +++ b/extensions/Persona/template/en/default/admin/params/persona.html.tmpl @@ -18,5 +18,7 @@ persona_includejs_url => "This is the URL needed by Persona to load the necessary " _ "javascript library for authentication. " _ "Example: <kbd>https://login.persona.org/include.js</kbd>." + persona_proxy_url => "The URL of a HTTPS proxy server (optional). " _ + "Example: <kbd>http://proxy.example.com:3128</kbd>." } %] |