diff --git a/Server.php b/Server.php index 718b0eb..fbd158b 100644 --- a/Server.php +++ b/Server.php @@ -58,4 +58,13 @@ public function handleAuthorizeRequest(\OAuth2\RequestInterface $request = null, return parent::handleAuthorizeRequest($request, $response, $isAuthorized, $userId); } + + public function handleUserInfoRequest(\OAuth2\RequestInterface $request = null, \OAuth2\ResponseInterface $response = null) + { + if($request === null) { + $request = $this->module->getRequest(); + } + return parent::handleUserInfoRequest($request, $response); + } + } diff --git a/controllers/RestController.php b/controllers/RestController.php index d953ae7..8e88eda 100755 --- a/controllers/RestController.php +++ b/controllers/RestController.php @@ -33,4 +33,10 @@ public function actionRevoke() $response = $this->module->getServer()->handleRevokeRequest(); return $response->getParameters(); } + + public function actionUserInfo() + { + $response = $this->module->getServer()->handleUserInfoRequest(); + return $response->getParameters(); + } }