rename events

This commit is contained in:
Artem Vasilev 2024-03-14 23:29:17 +03:00
parent b4280c45e3
commit c6748ce7f1

View File

@ -168,7 +168,7 @@ class LoginController extends BaseController
->addListener( ->addListener(
LeagueRequestEvent::USER_AUTHENTICATION_FAILED, LeagueRequestEvent::USER_AUTHENTICATION_FAILED,
function (LeagueRequestEvent $event) { function (LeagueRequestEvent $event) {
$name = 'onUserAuthenticationFailed'; $name = 'onOauthUserAuthenticationFailed';
$this->getDispatcher()->dispatch($name, new RequestEvent( $this->getDispatcher()->dispatch($name, new RequestEvent(
$name, $name,
['request' => $event->getRequest()] ['request' => $event->getRequest()]
@ -177,7 +177,7 @@ class LoginController extends BaseController
)->addListener( )->addListener(
LeagueRequestEvent::CLIENT_AUTHENTICATION_FAILED, LeagueRequestEvent::CLIENT_AUTHENTICATION_FAILED,
function (LeagueRequestEvent $event) { function (LeagueRequestEvent $event) {
$name = 'onClientAuthenticationFailed'; $name = 'onOauthClientAuthenticationFailed';
$this->getDispatcher()->dispatch($name, new RequestEvent( $this->getDispatcher()->dispatch($name, new RequestEvent(
$name, $name,
['request' => $event->getRequest()] ['request' => $event->getRequest()]
@ -186,7 +186,7 @@ class LoginController extends BaseController
)->addListener( )->addListener(
LeagueRequestEvent::REFRESH_TOKEN_CLIENT_FAILED, LeagueRequestEvent::REFRESH_TOKEN_CLIENT_FAILED,
function (LeagueRequestEvent $event) { function (LeagueRequestEvent $event) {
$name = 'onRefreshTokenClientFailed'; $name = 'onOauthRefreshTokenClientFailed';
$this->getDispatcher()->dispatch($name, new RequestEvent( $this->getDispatcher()->dispatch($name, new RequestEvent(
$name, $name,
['request' => $event->getRequest()] ['request' => $event->getRequest()]
@ -196,7 +196,7 @@ class LoginController extends BaseController
LeagueRequestEvent::REFRESH_TOKEN_ISSUED, LeagueRequestEvent::REFRESH_TOKEN_ISSUED,
function (LeagueRequestEvent $event) { function (LeagueRequestEvent $event) {
/** @var \League\OAuth2\Server\RequestRefreshTokenEvent $event */ /** @var \League\OAuth2\Server\RequestRefreshTokenEvent $event */
$name = 'onRefreshTokenIssued'; $name = 'onOauthRefreshTokenIssued';
$this->getDispatcher()->dispatch($name, new RequestRefreshTokenEvent( $this->getDispatcher()->dispatch($name, new RequestRefreshTokenEvent(
$name, $name,
[ [
@ -209,7 +209,7 @@ class LoginController extends BaseController
LeagueRequestEvent::ACCESS_TOKEN_ISSUED, LeagueRequestEvent::ACCESS_TOKEN_ISSUED,
function (LeagueRequestEvent $event) { function (LeagueRequestEvent $event) {
/** @var \League\OAuth2\Server\RequestAccessTokenEvent $event */ /** @var \League\OAuth2\Server\RequestAccessTokenEvent $event */
$name = 'onAccessTokenIssued'; $name = 'onOauthAccessTokenIssued';
$this->getDispatcher()->dispatch($name, new RequestAccessTokenEvent( $this->getDispatcher()->dispatch($name, new RequestAccessTokenEvent(
$name, $name,
[ [