Bugzilla – Attachment 105997 Details for
Bug 25797
REST API using OAuth doesn't actually authorize
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Authorise on the x-koha-authorization header, not the authorization header
rest-api-oauth2-authorization.patch (text/plain), 548 bytes, created by
Nicholas van Oudtshoorn
on 2020-06-18 07:20:29 UTC
(
hide
)
Description:
Authorise on the x-koha-authorization header, not the authorization header
Filename:
MIME Type:
Creator:
Nicholas van Oudtshoorn
Created:
2020-06-18 07:20:29 UTC
Size:
548 bytes
patch
obsolete
>--- Auth.pm.old 2020-06-18 15:16:53.062848795 +0800 >+++ Auth.pm 2020-06-18 15:16:37.671561273 +0800 >@@ -157,8 +157,8 @@ > > my $authorization = $spec->{'x-koha-authorization'}; > >- my $authorization_header = $c->req->headers->authorization; >- >+ my $headers = $c->req->content->headers; >+ my $authorization_header = $headers->header('x-koha-authorization'); > if ($authorization_header and $authorization_header =~ /^Bearer /) { > # attempt to use OAuth2 authentication > if ( ! Module::Load::Conditional::can_load(
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 25797
: 105997