Koha-clms/Koha/REST
Tomas Cohen Arazi 997a570550 Bug 20624: Make /api/v1/oauth/token respect RESTOAuth2ClientCredentials
This patch makes the /api/v1/oauth/token enpoint respect the
RESTOAuth2ClientCredentials syspref. It will return 400 (with
'Unimplemented grant type' error message) on the event of the syspref
being disabled and the grant_type => 'client_credentials' value passed.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/oauth.t
=> FAIL: It fails because the off-switch is not implemented
- Apply this patch
- Run:
  k$ prove t/db_dependent/api/v1/oauth.t
=> SUCCESS: Tests pass!
- Sign off :-D

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-09 12:56:02 -03:00
..
Plugin Bug 19686: (follow-up) Add to_api param for completeness 2018-02-16 14:05:20 -03:00
V1 Bug 20624: Make /api/v1/oauth/token respect RESTOAuth2ClientCredentials 2018-05-09 12:56:02 -03:00
V1.pm Bug 20402: Remove dependency on Mojo::Plugin::OAuth2::Server 2018-05-08 15:55:42 -03:00