Move grant check for client back to validate method

This commit is contained in:
sephster
2018-09-01 14:38:31 +01:00
parent 060a090479
commit cfa9b8d3b4
2 changed files with 4 additions and 10 deletions

View File

@@ -181,7 +181,7 @@ abstract class AbstractGrant implements GrantTypeInterface
$clientSecret = $this->getRequestParameter('client_secret', $request, $basicAuthPassword);
if ($this->clientRepository->validateClient($clientId, $clientSecret) === false) {
if ($this->clientRepository->validateClient($clientId, $clientSecret, $this->getIdentifier()) === false) {
$this->getEmitter()->emit(new RequestEvent(RequestEvent::CLIENT_AUTHENTICATION_FAILED, $request));
throw OAuthServerException::invalidClient($request);
@@ -191,7 +191,7 @@ abstract class AbstractGrant implements GrantTypeInterface
// If a redirect URI is provided ensure it matches what is pre-registered
$redirectUri = $this->getRequestParameter('redirect_uri', $request, null);
if ($redirectUri !== null) {
$this->validateRedirectUri($redirectUri, $client, $request);
}