for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2018 Spomky-Labs
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
namespace OAuth2Framework\Component\Server\TokenEndpoint\AuthenticationMethod;
use OAuth2Framework\Component\Server\Core\Client\Client;
use OAuth2Framework\Component\Server\Core\Client\ClientId;
use OAuth2Framework\Component\Server\Core\DataBag\DataBag;
use Psr\Http\Message\ServerRequestInterface;
final class None implements AuthenticationMethod
{
/**
* {@inheritdoc}
public function getSchemesParameters(): array
return [];
}
public function findClientIdAndCredentials(ServerRequestInterface $request, &$clientCredentials = null): ? ClientId
$parameters = $request->getParsedBody() ?? [];
if (array_key_exists('client_id', $parameters)) {
return ClientId::create($parameters['client_id']);
return null;
public function checkClientConfiguration(DataBag $command_parameters, DataBag $validated_parameters): DataBag
return $validated_parameters;
public function isClientAuthenticated(Client $client, $clientCredentials, ServerRequestInterface $request): bool
return true;
public function getSupportedMethods(): array
return ['none'];