client secret can be null

This commit is contained in:
Julián Gutiérrez 2016-01-20 12:50:23 +01:00
parent 3e5889e93b
commit 8fb64041df
2 changed files with 5 additions and 5 deletions

View File

@ -161,10 +161,10 @@ abstract class AbstractGrant implements GrantTypeInterface
} }
$client = $this->clientRepository->getClientEntity( $client = $this->clientRepository->getClientEntity(
$this->getIdentifier(),
$clientId, $clientId,
$clientSecret, $clientSecret,
null, null
$this->getIdentifier()
); );
if (!$client instanceof ClientEntityInterface) { if (!$client instanceof ClientEntityInterface) {

View File

@ -19,12 +19,12 @@ interface ClientRepositoryInterface extends RepositoryInterface
/** /**
* Get a client * Get a client
* *
* @param string $grantType The grant type used
* @param string $clientIdentifier The client's identifier * @param string $clientIdentifier The client's identifier
* @param string $clientSecret The client's secret * @param string|null $clientSecret The client's secret
* @param string|null $redirectUri The client's redirect URI * @param string|null $redirectUri The client's redirect URI
* @param string|null $grantType The grant type used
* *
* @return \League\OAuth2\Server\Entities\Interfaces\ClientEntityInterface * @return \League\OAuth2\Server\Entities\Interfaces\ClientEntityInterface
*/ */
public function getClientEntity($clientIdentifier, $clientSecret, $redirectUri = null, $grantType = null); public function getClientEntity($grantType, $clientIdentifier, $clientSecret = null, $redirectUri = null);
} }