support grant specific access token ttl

This commit is contained in:
pulkit
2014-09-11 13:39:50 +01:00
parent 9e2a6ed238
commit 1ff3d1adda
6 changed files with 21 additions and 13 deletions

View File

@@ -80,6 +80,19 @@ abstract class AbstractGrant implements GrantTypeInterface
return $this->responseType;
}
/**
* Get the TTL for an access token
* @return int The TTL
*/
public function getAccessTokenTTL()
{
if ($this->accessTokenTTL) {
return $this->accessTokenTTL;
}
return $this->server->getAccessTokenTTL();
}
/**
* Override the default access token expire time
* @param int $accessTokenTTL