mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
support grant specific access token ttl
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user