Skip to content

Commit

Permalink
Merge pull request filsh#112 from pinfirestudios/openid-connect-user-…
Browse files Browse the repository at this point in the history
…info

Add OpenID Connect UserInfo end-point to REST controller
  • Loading branch information
filsh authored Nov 24, 2016
2 parents 44aa609 + ba7c7f0 commit ae91739
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

}
6 changes: 6 additions & 0 deletions controllers/RestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

0 comments on commit ae91739

Please sign in to comment.