diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-12-18 15:48:49 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-12-18 15:48:49 +0100 |
commit | 439d41b194073285ab97be94253b3f4cb4395e43 (patch) | |
tree | 272d4c64ea2d766235ecb41009117b5269f8cdfd /vendor/bshaffer/oauth2-server-php/src/OAuth2/OpenID/Controller/AuthorizeController.php | |
parent | 08a8f195e749a120642f6c486c1dad62a73924d1 (diff) | |
download | volse-hubzilla-439d41b194073285ab97be94253b3f4cb4395e43.tar.gz volse-hubzilla-439d41b194073285ab97be94253b3f4cb4395e43.tar.bz2 volse-hubzilla-439d41b194073285ab97be94253b3f4cb4395e43.zip |
install smarty via composer and update other php libs
Diffstat (limited to 'vendor/bshaffer/oauth2-server-php/src/OAuth2/OpenID/Controller/AuthorizeController.php')
-rw-r--r-- | vendor/bshaffer/oauth2-server-php/src/OAuth2/OpenID/Controller/AuthorizeController.php | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/vendor/bshaffer/oauth2-server-php/src/OAuth2/OpenID/Controller/AuthorizeController.php b/vendor/bshaffer/oauth2-server-php/src/OAuth2/OpenID/Controller/AuthorizeController.php index c9b5c6af7..54c5f9a63 100644 --- a/vendor/bshaffer/oauth2-server-php/src/OAuth2/OpenID/Controller/AuthorizeController.php +++ b/vendor/bshaffer/oauth2-server-php/src/OAuth2/OpenID/Controller/AuthorizeController.php @@ -11,8 +11,19 @@ use OAuth2\ResponseInterface; */ class AuthorizeController extends BaseAuthorizeController implements AuthorizeControllerInterface { + /** + * @var mixed + */ private $nonce; + /** + * Set not authorized response + * + * @param RequestInterface $request + * @param ResponseInterface $response + * @param string $redirect_uri + * @param null $user_id + */ protected function setNotAuthorizedResponse(RequestInterface $request, ResponseInterface $response, $redirect_uri, $user_id = null) { $prompt = $request->query('prompt', 'consent'); @@ -32,6 +43,14 @@ class AuthorizeController extends BaseAuthorizeController implements AuthorizeCo $response->setRedirect($this->config['redirect_status_code'], $redirect_uri, $this->getState(), $error, $error_message); } + /** + * @TODO: add dependency injection for the parameters in this method + * + * @param RequestInterface $request + * @param ResponseInterface $response + * @param mixed $user_id + * @return array + */ protected function buildAuthorizeParameters($request, $response, $user_id) { if (!$params = parent::buildAuthorizeParameters($request, $response, $user_id)) { @@ -49,6 +68,11 @@ class AuthorizeController extends BaseAuthorizeController implements AuthorizeCo return $params; } + /** + * @param RequestInterface $request + * @param ResponseInterface $response + * @return bool + */ public function validateAuthorizeRequest(RequestInterface $request, ResponseInterface $response) { if (!parent::validateAuthorizeRequest($request, $response)) { @@ -69,6 +93,11 @@ class AuthorizeController extends BaseAuthorizeController implements AuthorizeCo return true; } + /** + * Array of valid response types + * + * @return array + */ protected function getValidResponseTypes() { return array( @@ -87,11 +116,8 @@ class AuthorizeController extends BaseAuthorizeController implements AuthorizeCo * method checks whether OpenID Connect is enabled in the server settings * and whether the openid scope was requested. * - * @param $request_scope - * A space-separated string of scopes. - * - * @return - * TRUE if an id token is needed, FALSE otherwise. + * @param string $request_scope - A space-separated string of scopes. + * @return boolean - TRUE if an id token is needed, FALSE otherwise. */ public function needsIdToken($request_scope) { @@ -99,6 +125,9 @@ class AuthorizeController extends BaseAuthorizeController implements AuthorizeCo return $this->scopeUtil->checkScope('openid', $request_scope); } + /** + * @return mixed + */ public function getNonce() { return $this->nonce; |