mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-01-05 19:43:56 +05:30
Fix docblocks + method name
This commit is contained in:
parent
b727be55a2
commit
282bb20cc8
@ -66,10 +66,9 @@ class RefreshTokenGrant extends AbstractGrant
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the rotation boolean of the refresh token
|
* Set the rotation boolean of the refresh token
|
||||||
*
|
* @param bool $refreshTokenRotate
|
||||||
* @return int
|
|
||||||
*/
|
*/
|
||||||
public function setRefreshTokenRotation($refreshTokenRotate)
|
public function setRefreshTokenRotation($refreshTokenRotate = true)
|
||||||
{
|
{
|
||||||
$this->refreshTokenRotate = $refreshTokenRotate;
|
$this->refreshTokenRotate = $refreshTokenRotate;
|
||||||
}
|
}
|
||||||
@ -77,9 +76,9 @@ class RefreshTokenGrant extends AbstractGrant
|
|||||||
/**
|
/**
|
||||||
* Get rotation boolean of the refresh token
|
* Get rotation boolean of the refresh token
|
||||||
*
|
*
|
||||||
* @return int
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function shouldRefreshTokenRotate()
|
public function shouldRotateRefreshTokens()
|
||||||
{
|
{
|
||||||
return $this->refreshTokenRotate;
|
return $this->refreshTokenRotate;
|
||||||
}
|
}
|
||||||
@ -173,7 +172,7 @@ class RefreshTokenGrant extends AbstractGrant
|
|||||||
$this->server->getTokenType()->setParam('access_token', $newAccessToken->getId());
|
$this->server->getTokenType()->setParam('access_token', $newAccessToken->getId());
|
||||||
$this->server->getTokenType()->setParam('expires_in', $this->getAccessTokenTTL());
|
$this->server->getTokenType()->setParam('expires_in', $this->getAccessTokenTTL());
|
||||||
|
|
||||||
if ($this->shouldRefreshTokenRotate()) {
|
if ($this->shouldRotateRefreshTokens()) {
|
||||||
// Expire the old refresh token
|
// Expire the old refresh token
|
||||||
$oldRefreshToken->expire();
|
$oldRefreshToken->expire();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user