Clarified example

This commit is contained in:
Alex Bilbie 2016-04-12 20:23:05 +01:00
parent 0178a837d4
commit 88b01b792a

View File

@ -37,10 +37,13 @@ $app = new App([
$publicKeyPath $publicKeyPath
); );
// Enable the refresh token grant on the server with a token TTL of 1 hour // Enable the refresh token grant on the server
$grant = new RefreshTokenGrant($refreshTokenRepository);
$grant->setRefreshTokenTTL(new \DateInterval('P1M')); // The refresh token will expire in 1 month
$server->enableGrantType( $server->enableGrantType(
new RefreshTokenGrant($refreshTokenRepository), $grant,
new \DateInterval('PT1H') new \DateInterval('PT1H') // The new access token will expire after 1 hour
); );
return $server; return $server;