diff --git a/com_oauthserver/administrator/src/Event/TokenRequestResolveEvent.php b/com_oauthserver/administrator/src/Event/TokenRequestResolveEvent.php new file mode 100644 index 0000000..23dbaa2 --- /dev/null +++ b/com_oauthserver/administrator/src/Event/TokenRequestResolveEvent.php @@ -0,0 +1,31 @@ + + * @license MIT; see LICENSE.txt + **/ + +namespace Webmasterskaya\Component\OauthServer\Administrator\Event; + +use Joomla\CMS\Event\AbstractEvent; +use Psr\Http\Message\ResponseInterface; + +class TokenRequestResolveEvent extends AbstractEvent +{ + public function __construct(string $name, array $arguments = []) + { + if (!array_key_exists('response', $arguments)) + { + throw new \BadMethodCallException("Argument 'response' is required for event $name"); + } + + parent::__construct($name, $arguments); + } + + public function onSetResponse(ResponseInterface $response): ResponseInterface + { + return $response; + } +}