From 439d41b194073285ab97be94253b3f4cb4395e43 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 18 Dec 2017 15:48:49 +0100 Subject: install smarty via composer and update other php libs --- .../src/OAuth2/Controller/ResourceController.php | 49 +++++++++++++++++++++- 1 file changed, 47 insertions(+), 2 deletions(-) (limited to 'vendor/bshaffer/oauth2-server-php/src/OAuth2/Controller/ResourceController.php') diff --git a/vendor/bshaffer/oauth2-server-php/src/OAuth2/Controller/ResourceController.php b/vendor/bshaffer/oauth2-server-php/src/OAuth2/Controller/ResourceController.php index 3cfaaaf12..926f90fda 100644 --- a/vendor/bshaffer/oauth2-server-php/src/OAuth2/Controller/ResourceController.php +++ b/vendor/bshaffer/oauth2-server-php/src/OAuth2/Controller/ResourceController.php @@ -10,17 +10,43 @@ use OAuth2\ResponseInterface; use OAuth2\Scope; /** - * @see OAuth2\Controller\ResourceControllerInterface + * @see ResourceControllerInterface */ class ResourceController implements ResourceControllerInterface { + /** + * @var array + */ private $token; + /** + * @var TokenTypeInterface + */ protected $tokenType; + + /** + * @var AccessTokenInterface + */ protected $tokenStorage; + + /** + * @var array + */ protected $config; + + /** + * @var ScopeInterface + */ protected $scopeUtil; + /** + * Constructor + * + * @param TokenTypeInterface $tokenType + * @param AccessTokenInterface $tokenStorage + * @param array $config + * @param ScopeInterface $scopeUtil + */ public function __construct(TokenTypeInterface $tokenType, AccessTokenInterface $tokenStorage, $config = array(), ScopeInterface $scopeUtil = null) { $this->tokenType = $tokenType; @@ -36,6 +62,14 @@ class ResourceController implements ResourceControllerInterface $this->scopeUtil = $scopeUtil; } + /** + * Verify the resource request + * + * @param RequestInterface $request + * @param ResponseInterface $response + * @param null $scope + * @return bool + */ public function verifyResourceRequest(RequestInterface $request, ResponseInterface $response, $scope = null) { $token = $this->getAccessTokenData($request, $response); @@ -71,6 +105,13 @@ class ResourceController implements ResourceControllerInterface return (bool) $token; } + /** + * Get access token data. + * + * @param RequestInterface $request + * @param ResponseInterface $response + * @return array|null + */ public function getAccessTokenData(RequestInterface $request, ResponseInterface $response) { // Get the token parameter @@ -103,7 +144,11 @@ class ResourceController implements ResourceControllerInterface return null; } - // convenience method to allow retrieval of the token + /** + * convenience method to allow retrieval of the token. + * + * @return array + */ public function getToken() { return $this->token; -- cgit v1.2.3