Update src/Module/OAuth/Token.php

Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
Michael Vogel 2021-06-16 22:19:26 +02:00 committed by GitHub
parent 6b3476409a
commit a256f18159
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,7 @@ class Token extends BaseApi
$authorization = $_SERVER['REDIRECT_REMOTE_USER'] ?? '';
}
if (empty($request['client_id']) && !empty($authorization) && (substr($authorization, 0, 6) == 'Basic ')) {
if (empty($request['client_id']) && substr($authorization, 0, 6) == 'Basic ') {
$datapair = explode(':', base64_decode(trim(substr($authorization, 6))));
if (count($datapair) == 2) {
$request['client_id'] = $datapair[0];