From: Jeff Davis Date: Thu, 2 Jul 2020 22:10:56 +0000 (-0700) Subject: LP#1526558: make it optional to use AuthProxy for SIP client login X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d6af5a2a5b656aca77e424e0c7f988600b2cf8fb;p=working%2FEvergreen.git LP#1526558: make it optional to use AuthProxy for SIP client login You may wish to use an authentication proxy for SIP patron authentication, but generally the SIP client login will be known only to Evergreen, not to the central authentication system. This commit avoids using the authentication proxy for client login unless the new SIP "use_proxy_for_client_login" option is set to "true". Signed-off-by: Jeff Davis Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm b/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm index 1121bb454a..7e82366692 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm @@ -196,6 +196,8 @@ sub login { return $self->{authtoken} if ($self->fetch_session); # fetch the session } + my $use_proxy_for_client_login = $self->get_option_value('use_proxy_for_client_login') || 'false'; + my $auth_proxy_enabled = 0; eval { $auth_proxy_enabled = $U->simplereq( @@ -205,7 +207,7 @@ sub login { }; my $response; - if ($auth_proxy_enabled) { + if ($auth_proxy_enabled && $use_proxy_for_client_login =~ /true/i) { $response = $U->simplereq( 'open-ils.auth_proxy', 'open-ils.auth_proxy.login',