diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2023-04-04 06:30:25 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2023-04-04 06:30:25 +0000 |
| commit | 3bbd143efd807a7cc0c7183b0e4c782b80478c3c (patch) | |
| tree | 64980a01ace36407a051ac4863ba16881bd69375 /lib | |
| parent | 2f6ee1060aedec703a967e5d1ad59a6a0e703c06 (diff) | |
allow grant type 'refresh_token' as well, fixes #2507
Closes #2507
Merge request studip/studip!1694
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/classes/OAuth2/Bridge/ClientRepository.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/classes/OAuth2/Bridge/ClientRepository.php b/lib/classes/OAuth2/Bridge/ClientRepository.php index b6fd4f6..526e839 100644 --- a/lib/classes/OAuth2/Bridge/ClientRepository.php +++ b/lib/classes/OAuth2/Bridge/ClientRepository.php @@ -37,9 +37,10 @@ class ClientRepository implements ClientRepositoryInterface */ public function validateClient($clientIdentifier, $clientSecret, $grantType): bool { - if ($grantType !== 'authorization_code') { + if (!in_array($grantType, ['authorization_code', 'refresh_token'])) { return false; } + $client = Client::findActive($clientIdentifier); if (!$client) { return false; |
