View | Details | Raw Unified | Return to bug 20624
Collapse All | Expand All

(-)a/Koha/REST/V1/OAuth.pm (-2 / +1 lines)
Lines 13-19 sub token { Link Here
13
    my $c = shift->openapi->valid_input or return;
13
    my $c = shift->openapi->valid_input or return;
14
14
15
    my $grant_type = $c->validation->param('grant_type');
15
    my $grant_type = $c->validation->param('grant_type');
16
    unless ($grant_type eq 'client_credentials') {
16
    unless ( $grant_type eq 'client_credentials' and C4::Context->preference('RESTOAuth2ClientCredentials') ) {
17
        return $c->render(status => 400, openapi => {error => 'Unimplemented grant type'});
17
        return $c->render(status => 400, openapi => {error => 'Unimplemented grant type'});
18
    }
18
    }
19
19
20
- 

Return to bug 20624