If bail_on_fail is enabled in authenticator config, auth_proxy will bail
out if auth fails for that authenticator, instead of falling through to
the next one.
Signed-off-by: Jeff Davis <jeff.davis@bc.libraries.coop>
<unit>103</unit>
<unit>104</unit>
</org_units>
+ <bail_on_fail>false</bail_on_fail>
</authenticator>
-->
<!-- 'native' is a proxied version of Evergreen's standard authentication -->
next unless grep(/^(all|$args->{'org'})$/, @{$authenticator->{'org_units'}});
}
+ # Do we keep trying other authenticators if this one fails?
+ my $bail_on_fail = $authenticator->{bail_on_fail};
+
my $event;
# treat native specially
if ($authenticator->name eq 'native') {
my $code = $U->event_code($event);
if ($code) {
push @error_events, $event;
+ last if ($bail_on_fail and $bail_on_fail =~ /^t/i);
} elsif (defined $code) { # code is '0', i.e. SUCCESS
if (exists $event->{'payload'}) { # we have a complete native login
return $event;