At the moment ClientCredentialsGrant and AuthCodeGrant simply validate client as $this->validateClient($request);, while PasswordGrant and RefreshTokenGrant do $client = $this->validateClient($request);.
The latter is more convenient: in my very implementation using ClientCredentialsGrant - the ClientRepository::getClientEntity($clientIdentifier) does not have enough details to construct the client fully (but partially).
And the ClientRepository::validateClient($clientIdentifier, $clientSecret, $grantType) has everything I need.
So if ClientCredentialsGrant reused the result of validateClient - I could partially construct an object (enough to continue execution) then create another fully initialised client on validation.
At the moment
ClientCredentialsGrant
andAuthCodeGrant
simply validate client as$this->validateClient($request);
, whilePasswordGrant
andRefreshTokenGrant
do$client = $this->validateClient($request);
.The latter is more convenient: in my very implementation using
ClientCredentialsGrant
- theClientRepository::getClientEntity($clientIdentifier)
does not have enough details to construct the client fully (but partially).And the
ClientRepository::validateClient($clientIdentifier, $clientSecret, $grantType)
has everything I need.So if
ClientCredentialsGrant
reused the result ofvalidateClient
- I could partially construct an object (enough to continue execution) then create another fully initialised client on validation.What would you think about it?