Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,12 @@ public function handle(GetResponseEvent $event)
{
$request = $event->getRequest();

// At least one (and only one) of client credentials method required.
// At least one of client credentials method required.
// If more than one is set then basic auth will be used. Some clients (incorrectly) use more than one.
if (!$request->headers->get('PHP_AUTH_USER', false) && !$request->request->get('client_id', false)) {
throw new InvalidRequestException([
'error_description' => 'The request is missing a required parameter',
]);
} elseif ($request->headers->get('PHP_AUTH_USER', false) && $request->request->get('client_id', false)) {
throw new InvalidRequestException([
'error_description' => 'The request utilizes more than one mechanism for authenticating the client',
]);
}

// Check with HTTP basic auth if exists.
Expand Down