From 90d9d7bdd67eb13a2e8c89bcfdbbdec8873ab9c7 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sun, 17 Jan 2016 13:47:44 +0000 Subject: [PATCH] Required repositories are now set by the server --- src/Grant/AbstractGrant.php | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/Grant/AbstractGrant.php b/src/Grant/AbstractGrant.php index ff7aaced..ed2404f2 100644 --- a/src/Grant/AbstractGrant.php +++ b/src/Grant/AbstractGrant.php @@ -69,20 +69,29 @@ abstract class AbstractGrant implements GrantTypeInterface protected $scopeRepository; /** - * @param \League\OAuth2\Server\Repositories\ClientRepositoryInterface $clientRepository - * @param \League\OAuth2\Server\Repositories\ScopeRepositoryInterface $scopeRepository - * @param \League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface $accessTokenRepository + * @param ClientRepositoryInterface $clientRepository */ - public function __construct( - ClientRepositoryInterface $clientRepository, - ScopeRepositoryInterface $scopeRepository, - AccessTokenRepositoryInterface $accessTokenRepository - ) { + public function setClientRepository(ClientRepositoryInterface $clientRepository) + { $this->clientRepository = $clientRepository; - $this->scopeRepository = $scopeRepository; + } + + /** + * @param AccessTokenRepositoryInterface $accessTokenRepository + */ + public function setAccessTokenRepository(AccessTokenRepositoryInterface $accessTokenRepository) + { $this->accessTokenRepository = $accessTokenRepository; } + /** + * @param ScopeRepositoryInterface $scopeRepository + */ + public function setScopeRepository(ScopeRepositoryInterface $scopeRepository) + { + $this->scopeRepository = $scopeRepository; + } + /** * {@inheritdoc} */