mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-15 17:56:14 +05:30
Updated AbstractResponseType with interface methods
This commit is contained in:
parent
fd47712060
commit
1bdad3ad14
@ -12,15 +12,14 @@
|
|||||||
namespace League\OAuth2\Server\ResponseTypes;
|
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;
|
||||||
|
|
||||||
abstract class AbstractResponseType implements ResponseTypeInterface
|
abstract class AbstractResponseType implements ResponseTypeInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Response array for JSON serialization
|
* @var string
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
*/
|
||||||
protected $response = [];
|
protected $pathToPrivateKey;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface
|
* @var \League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface
|
||||||
@ -28,19 +27,16 @@ abstract class AbstractResponseType implements ResponseTypeInterface
|
|||||||
protected $accessToken;
|
protected $accessToken;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* @var \League\OAuth2\Server\Entities\Interfaces\RefreshTokenEntityInterface
|
||||||
*/
|
*/
|
||||||
public function setParam($key, $value)
|
protected $refreshToken;
|
||||||
{
|
|
||||||
$this->response[$key] = $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@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;
|
$this->accessToken = $accessToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \League\OAuth2\Server\Entities\Interfaces\RefreshTokenEntityInterface $refreshToken
|
||||||
|
*/
|
||||||
|
public function setRefreshToken(RefreshTokenEntityInterface $refreshToken)
|
||||||
|
{
|
||||||
|
$this->refreshToken = $refreshToken;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user