Bugzilla – Attachment 150919 Details for
Bug 33708
OAuth/OIDC authentication for the staff interface requires OPAC enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33708: Allow anonymous access to OAuth endpoints
Bug-33708-Allow-anonymous-access-to-OAuth-endpoint.patch (text/plain), 1.17 KB, created by
David Cook
on 2023-05-10 02:45:14 UTC
(
hide
)
Description:
Bug 33708: Allow anonymous access to OAuth endpoints
Filename:
MIME Type:
Creator:
David Cook
Created:
2023-05-10 02:45:14 UTC
Size:
1.17 KB
patch
obsolete
>From db4d47959e9843b84e6645ddc5ac56b50b006286 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Wed, 10 May 2023 02:43:44 +0000 >Subject: [PATCH] Bug 33708: Allow anonymous access to OAuth endpoints > >Users needs anonymous access to OAuth endpoints so that they can >login, and then use authenticated access for other endpoints. >--- > Koha/REST/V1/Auth.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/REST/V1/Auth.pm b/Koha/REST/V1/Auth.pm >index 1b2a9c090b..b04fcaeb62 100644 >--- a/Koha/REST/V1/Auth.pm >+++ b/Koha/REST/V1/Auth.pm >@@ -81,8 +81,8 @@ sub under { > "Configuration prevents the usage of this endpoint by unprivileged users"); > } > >- if ( $c->req->url->to_abs->path eq '/api/v1/oauth/token' ) { >- # Requesting a token shouldn't go through the API authentication chain >+ if ( $c->req->url->to_abs->path =~ m#^/api/v1/oauth/# || $c->req->url->to_abs->path =~ m#^/api/v1/public/oauth/#) { >+ # Requesting OAuth endpoints shouldn't go through the API authentication chain > $status = 1; > } > elsif ( $namespace eq '' or $namespace eq '.html' ) { >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33708
:
150905
|
150918
|
150919
|
151037
|
151038
|
151039