mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-25 22:49:49 +05:30
Added access token repository and public key path as required params to response type constructor
This commit is contained in:
parent
8ee4dc7eb9
commit
c7a904ca40
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user