[Koha-bugs] [Bug 20624] Disable the OAuth2 client credentials grant by default

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 4 12:58:39 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20624

--- Comment #18 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 75064
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75064&action=edit
Bug 20624: (QA follow-up) Unit tests for missing deps situation

This patch tests the situation in which Net::OAuth2::AuthorizationServer
is missing. It mocks Module::Load::Conditional::can_load and expects the
/token endpoint answers 'Unimplemented grant type' to all requests, and
the 'authenticate_api_request' in 'under' exit with unauthorized (403)
to requests in which the Authorization header is passed containing a
Bearer token, but OAuth2 is not really available.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/oauth.t
=> FAIL: Tests fail because our REST endpoints don't support this
behaviour.

Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>

Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list