diff --git a/src/ResponseTypes/AbstractResponseType.php b/src/ResponseTypes/AbstractResponseType.php index ed85c1c4..bed080fd 100644 --- a/src/ResponseTypes/AbstractResponseType.php +++ b/src/ResponseTypes/AbstractResponseType.php @@ -12,15 +12,14 @@ namespace League\OAuth2\Server\ResponseTypes; use League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface; +use League\OAuth2\Server\Entities\Interfaces\RefreshTokenEntityInterface; abstract class AbstractResponseType implements ResponseTypeInterface { /** - * Response array for JSON serialization - * - * @var array + * @var string */ - protected $response = []; + protected $pathToPrivateKey; /** * @var \League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface @@ -28,19 +27,16 @@ abstract class AbstractResponseType implements ResponseTypeInterface protected $accessToken; /** - * {@inheritdoc} + * @var \League\OAuth2\Server\Entities\Interfaces\RefreshTokenEntityInterface */ - public function setParam($key, $value) - { - $this->response[$key] = $value; - } + protected $refreshToken; /** - * {@inheritdoc} + * @param string $pathToPrivateKey */ - public function getParam($key) + public function __construct($pathToPrivateKey) { - return isset($this->response[$key]) ? $this->response[$key] : null; + $this->pathToPrivateKey = $pathToPrivateKey; } /** @@ -50,4 +46,12 @@ abstract class AbstractResponseType implements ResponseTypeInterface { $this->accessToken = $accessToken; } + + /** + * @param \League\OAuth2\Server\Entities\Interfaces\RefreshTokenEntityInterface $refreshToken + */ + public function setRefreshToken(RefreshTokenEntityInterface $refreshToken) + { + $this->refreshToken = $refreshToken; + } }