mirror of
https://github.com/webmasterskaya/joomla-oauth-server.git
synced 2024-11-27 13:06:15 +03:00
Abstract emmit listeners register
This commit is contained in:
parent
b584ecbcbf
commit
96db629ab7
@ -25,6 +25,7 @@ use League\OAuth2\Server\Grant\AuthCodeGrant;
|
||||
use League\OAuth2\Server\Grant\ClientCredentialsGrant;
|
||||
use League\OAuth2\Server\Grant\ImplicitGrant;
|
||||
use League\OAuth2\Server\Grant\RefreshTokenGrant;
|
||||
use League\OAuth2\Server\RequestEvent;
|
||||
use Webmasterskaya\Component\OauthServer\Administrator\Model\AccessTokenModel;
|
||||
use Webmasterskaya\Component\OauthServer\Administrator\Model\AuthCodeModel;
|
||||
use Webmasterskaya\Component\OauthServer\Administrator\Model\ClientModel;
|
||||
@ -159,6 +160,34 @@ class LoginController extends BaseController
|
||||
);
|
||||
}
|
||||
|
||||
$server->getEmitter()
|
||||
->addListener(
|
||||
RequestEvent::USER_AUTHENTICATION_FAILED,
|
||||
function (RequestEvent $event) {
|
||||
// TODO:: Dispatch event with Joomla EventDispatcher by name `onUserAuthenticationFailed`
|
||||
}
|
||||
)->addListener(
|
||||
RequestEvent::CLIENT_AUTHENTICATION_FAILED,
|
||||
function (RequestEvent $event) {
|
||||
// TODO:: Dispatch event with Joomla EventDispatcher by name `onClientAuthenticationFailed`
|
||||
}
|
||||
)->addListener(
|
||||
RequestEvent::REFRESH_TOKEN_CLIENT_FAILED,
|
||||
function (RequestEvent $event) {
|
||||
// TODO:: Dispatch event with Joomla EventDispatcher by name `onRefreshTokenClientFailed`
|
||||
}
|
||||
)->addListener(
|
||||
RequestEvent::REFRESH_TOKEN_ISSUED,
|
||||
function (RequestEvent $event) {
|
||||
// TODO:: Dispatch event with Joomla EventDispatcher by name `onRefreshTokenIssued`
|
||||
}
|
||||
)->addListener(
|
||||
RequestEvent::ACCESS_TOKEN_ISSUED,
|
||||
function (RequestEvent $event) {
|
||||
// TODO:: Dispatch event with Joomla EventDispatcher by name `onAccessTokenIssued`
|
||||
}
|
||||
);
|
||||
|
||||
$this->authorizationServer = $server;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user