Added access token repository and public key path as required params to response type constructor

This commit is contained in:
Alex Bilbie 2016-01-17 13:56:46 +00:00
parent 8ee4dc7eb9
commit c7a904ca40

View File

@ -13,6 +13,7 @@ namespace League\OAuth2\Server\ResponseTypes;
use League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface; use League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface;
use League\OAuth2\Server\Entities\Interfaces\RefreshTokenEntityInterface; use League\OAuth2\Server\Entities\Interfaces\RefreshTokenEntityInterface;
use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface;
abstract class AbstractResponseType implements ResponseTypeInterface abstract class AbstractResponseType implements ResponseTypeInterface
{ {
@ -21,6 +22,11 @@ abstract class AbstractResponseType implements ResponseTypeInterface
*/ */
protected $pathToPrivateKey; protected $pathToPrivateKey;
/**
* @var string
*/
protected $pathToPublicKey;
/** /**
* @var \League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface * @var \League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface
*/ */
@ -32,11 +38,23 @@ abstract class AbstractResponseType implements ResponseTypeInterface
protected $refreshToken; 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->pathToPrivateKey = $pathToPrivateKey;
$this->pathToPublicKey = $pathToPublicKey;
$this->accessTokenRepository = $accessTokenRepository;
} }
/** /**