Moved client secret validation to abstract grant. Fixes #460

This commit is contained in:
Alex Bilbie 2016-03-15 21:30:13 +00:00
parent 9e828f8f3c
commit 3365f3d733

View File

@ -197,7 +197,7 @@ abstract class AbstractGrant implements GrantTypeInterface
throw OAuthServerException::invalidRequest('client_secret', '`%s` parameter is missing');
}
if ($client->canKeepASecret() && $client->validateSecret($clientSecret) === false) {
if ($client->canKeepASecret() && password_verify($clientSecret, $client->getSecret()) === false) {
$this->getEmitter()->emit(new Event('client.authentication.failed', $request));
throw OAuthServerException::invalidClient();
}