From 655a4b27159f1d88ccd2cfb42687da65742b04e7 Mon Sep 17 00:00:00 2001 From: Luca Degasperi Date: Thu, 30 Jun 2016 16:49:47 +0200 Subject: [PATCH] Make ClientRepositoryInterface more flexible This small change will allow the use of the ```ClientRepositoryInterface``` for more use cases than simply validating clients when authorizing them. There might be some places where this change will affect the behavior. I also think the ```$mustValidateSecret``` is redundant since in an implementation a check could be done wether ```$clientSecret``` is null or not. --- src/Repositories/ClientRepositoryInterface.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Repositories/ClientRepositoryInterface.php b/src/Repositories/ClientRepositoryInterface.php index fc56c2f3..4653adaf 100644 --- a/src/Repositories/ClientRepositoryInterface.php +++ b/src/Repositories/ClientRepositoryInterface.php @@ -17,12 +17,12 @@ interface ClientRepositoryInterface extends RepositoryInterface * Get a client. * * @param string $clientIdentifier The client's identifier - * @param string $grantType The grant type used + * @param null|string $grantType The grant type used (if sent) * @param null|string $clientSecret The client's secret (if sent) * @param bool $mustValidateSecret If true the client must attempt to validate the secret unless the client * is confidential * * @return \League\OAuth2\Server\Entities\ClientEntityInterface */ - public function getClientEntity($clientIdentifier, $grantType, $clientSecret = null, $mustValidateSecret = true); + public function getClientEntity($clientIdentifier, $grantType = null, $clientSecret = null, $mustValidateSecret = false); }