From e21a13c82c280f2989d4af89ca3e4c24f9db5b1c Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sun, 17 Jan 2016 13:54:39 +0000 Subject: [PATCH] Access token TTL is now configured on a per grant basis --- src/Server.php | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/src/Server.php b/src/Server.php index 535b7d21..ba4efd0d 100644 --- a/src/Server.php +++ b/src/Server.php @@ -43,15 +43,9 @@ class Server implements EmitterAwareInterface */ protected $defaultResponseType; - /** - * @var DateInterval - */ - protected $defaultAccessTokenTTL; - /** * @var string */ - protected $scopeDelimiterString = ' '; /** * New server instance @@ -90,29 +84,6 @@ class Server implements EmitterAwareInterface } /** - * Set the default TTL of access tokens - * - * @param DateInterval $defaultAccessTokenTTL - */ - public function setDefaultAccessTokenTTL(DateInterval $defaultAccessTokenTTL) - { - $this->defaultAccessTokenTTL = $defaultAccessTokenTTL; - } - - /** - * Get the default TTL of access tokens - * - * @return DateInterval - */ - protected function getDefaultAccessTokenTTL() - { - if (!$this->defaultAccessTokenTTL instanceof \DateInterval) { - $this->defaultAccessTokenTTL = new \DateInterval('PT01H'); // default token TTL of 1 hour - } - - return $this->defaultAccessTokenTTL; - } - /** * Enable a grant type on the server * @@ -123,7 +94,7 @@ class Server implements EmitterAwareInterface public function enableGrantType( GrantTypeInterface $grantType, ResponseTypeInterface $responseType = null, - \DateInterval $accessTokenTTL = null + \DateInterval $accessTokenTTL ) { $grantType->setEmitter($this->getEmitter()); $this->enabledGrantTypes[$grantType->getIdentifier()] = $grantType;