Added RequestEvent

This commit is contained in:
Alex Bilbie
2016-03-23 12:54:17 +00:00
parent 95cdaae17f
commit a698a4da7e
6 changed files with 45 additions and 13 deletions

View File

@@ -3,13 +3,13 @@
namespace League\OAuth2\Server\Grant;
use DateInterval;
use League\Event\Event;
use League\OAuth2\Server\Entities\Interfaces\ClientEntityInterface;
use League\OAuth2\Server\Entities\Interfaces\UserEntityInterface;
use League\OAuth2\Server\Exception\OAuthServerException;
use League\OAuth2\Server\Repositories\AuthCodeRepositoryInterface;
use League\OAuth2\Server\Repositories\RefreshTokenRepositoryInterface;
use League\OAuth2\Server\Repositories\UserRepositoryInterface;
use League\OAuth2\Server\RequestEvent;
use League\OAuth2\Server\ResponseTypes\HtmlResponse;
use League\OAuth2\Server\ResponseTypes\RedirectResponse;
use League\OAuth2\Server\ResponseTypes\ResponseTypeInterface;
@@ -72,7 +72,7 @@ class AuthCodeGrant extends AbstractAuthorizeGrant
);
if ($client instanceof ClientEntityInterface === false) {
$this->getEmitter()->emit(new Event('client.authentication.failed', $request));
$this->getEmitter()->emit(new RequestEvent('client.authentication.failed', $request));
throw OAuthServerException::invalidClient();
}