From 6332ecfa0b7b9ce1147768802ebb5306d4899aa0 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sun, 17 Jan 2016 14:03:33 +0000 Subject: [PATCH] Removed default overrides --- src/Server.php | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/Server.php b/src/Server.php index f0df7d61..b9d67e24 100644 --- a/src/Server.php +++ b/src/Server.php @@ -87,17 +87,14 @@ class Server implements EmitterAwareInterface return $this->defaultResponseType; } - /** /** * Enable a grant type on the server * * @param \League\OAuth2\Server\Grant\GrantTypeInterface $grantType - * @param ResponseTypeInterface $responseType * @param DateInterval $accessTokenTTL */ public function enableGrantType( GrantTypeInterface $grantType, - ResponseTypeInterface $responseType = null, \DateInterval $accessTokenTTL ) { $grantType->setAccessTokenRepository($this->accessTokenRepository); @@ -108,18 +105,10 @@ class Server implements EmitterAwareInterface $this->enabledGrantTypes[$grantType->getIdentifier()] = $grantType; // Set grant response type - if ($responseType instanceof ResponseTypeInterface) { - $this->grantResponseTypes[$grantType->getIdentifier()] = $responseType; - } else { - $this->grantResponseTypes[$grantType->getIdentifier()] = $this->getDefaultResponseType(); - } + $this->grantResponseTypes[$grantType->getIdentifier()] = $this->getDefaultResponseType(); // Set grant access token TTL - if ($accessTokenTTL instanceof \DateInterval) { - $this->grantTypeAccessTokenTTL[$grantType->getIdentifier()] = $accessTokenTTL; - } else { - $this->grantTypeAccessTokenTTL[$grantType->getIdentifier()] = $this->getDefaultAccessTokenTTL(); - } + $this->grantTypeAccessTokenTTL[$grantType->getIdentifier()] = $accessTokenTTL; } /**