Skip to content
Snippets Groups Projects
Commit 7ab7acad authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms Committed by Jan-Hendrik Willms
Browse files

allow grant type 'refresh_token' as well, fixes #2507

Closes #2507

Merge request studip/studip!1694
parent 0222b838
No related branches found
No related tags found
No related merge requests found
...@@ -37,9 +37,10 @@ class ClientRepository implements ClientRepositoryInterface ...@@ -37,9 +37,10 @@ class ClientRepository implements ClientRepositoryInterface
*/ */
public function validateClient($clientIdentifier, $clientSecret, $grantType): bool public function validateClient($clientIdentifier, $clientSecret, $grantType): bool
{ {
if ($grantType !== 'authorization_code') { if (!in_array($grantType, ['authorization_code', 'refresh_token'])) {
return false; return false;
} }
$client = Client::findActive($clientIdentifier); $client = Client::findActive($clientIdentifier);
if (!$client) { if (!$client) {
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment