From f1e499ccdd94a85363f005d698bfdfb2db43a746 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 3 Jun 2020 08:19:59 -0400 Subject: [PATCH] [19.11.x] Bug 22522: Fail back to ->openapi->spec --- Koha/REST/V1/Auth.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/REST/V1/Auth.pm b/Koha/REST/V1/Auth.pm index 8bffc977da..630db04e4a 100644 --- a/Koha/REST/V1/Auth.pm +++ b/Koha/REST/V1/Auth.pm @@ -136,7 +136,7 @@ sub authenticate_api_request { my $user; - my $spec = $c->match->endpoint->pattern->defaults->{'openapi.op_spec'}; + my $spec = $c->openapi->spec || $c->match->endpoint->pattern->defaults->{'openapi.op_spec'}; my $authorization = $spec->{'x-koha-authorization'}; my $authorization_header = $c->req->headers->authorization; -- 2.24.1 (Apple Git-126)