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/Persona/lib | |
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/Persona/lib')
-rw-r--r-- | extensions/Persona/lib/Config.pm | 7 | ||||
-rw-r--r-- | extensions/Persona/lib/Login.pm | 3 |
2 files changed, 9 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, |