From 23dcf429e71dfb5301c32b42dc40e5a47d11ed98 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Thu, 25 Jul 2013 01:12:35 +0800 Subject: Bug 897512: add support for proxies to the persona extension --- extensions/Persona/lib/Config.pm | 7 ++++++- extensions/Persona/lib/Login.pm | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'extensions/Persona/lib') 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, -- cgit v1.2.3-24-g4f1b