Tidy up comments

This commit is contained in:
Andrew Millington 2018-08-12 20:09:55 +01:00
parent 972808561d
commit 838f206832
No known key found for this signature in database
GPG Key ID: 077754CA23023F4F

View File

@ -71,6 +71,7 @@ class AuthCodeGrant extends AbstractAuthorizeGrant
throw OAuthServerException::invalidRequest('client_id'); throw OAuthServerException::invalidRequest('client_id');
} }
// Only validate the client if it is confidential
if ($this->clientRepository->isClientConfidential($clientId)) { if ($this->clientRepository->isClientConfidential($clientId)) {
$client = $this->validateClient($request); $client = $this->validateClient($request);
} else { } else {
@ -82,12 +83,6 @@ class AuthCodeGrant extends AbstractAuthorizeGrant
); );
} }
// Validate request
// HERE I ONLY WANT TO VALIDATE IF THE CLIENT IS CONFIDENTIAL!
$encryptedAuthCode = $this->getRequestParameter('code', $request, null); $encryptedAuthCode = $this->getRequestParameter('code', $request, null);
if ($encryptedAuthCode === null) { if ($encryptedAuthCode === null) {