From c7a904ca40ff22454598867f78d7cdce5de7dc1e Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sun, 17 Jan 2016 13:56:46 +0000 Subject: [PATCH] Added access token repository and public key path as required params to response type constructor --- src/ResponseTypes/AbstractResponseType.php | 24 +++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/ResponseTypes/AbstractResponseType.php b/src/ResponseTypes/AbstractResponseType.php index bed080fd..2388582f 100644 --- a/src/ResponseTypes/AbstractResponseType.php +++ b/src/ResponseTypes/AbstractResponseType.php @@ -13,6 +13,7 @@ namespace League\OAuth2\Server\ResponseTypes; use League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface; use League\OAuth2\Server\Entities\Interfaces\RefreshTokenEntityInterface; +use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface; abstract class AbstractResponseType implements ResponseTypeInterface { @@ -21,6 +22,11 @@ abstract class AbstractResponseType implements ResponseTypeInterface */ protected $pathToPrivateKey; + /** + * @var string + */ + protected $pathToPublicKey; + /** * @var \League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface */ @@ -32,11 +38,23 @@ abstract class AbstractResponseType implements ResponseTypeInterface protected $refreshToken; /** - * @param string $pathToPrivateKey + * @var \League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface */ - public function __construct($pathToPrivateKey) - { + protected $accessTokenRepository; + + /** + * @param string $pathToPrivateKey + * @param string $pathToPublicKey + * @param \League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface $accessTokenRepository + */ + public function __construct( + $pathToPrivateKey, + $pathToPublicKey, + AccessTokenRepositoryInterface $accessTokenRepository + ) { $this->pathToPrivateKey = $pathToPrivateKey; + $this->pathToPublicKey = $pathToPublicKey; + $this->accessTokenRepository = $accessTokenRepository; } /**