mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-02-09 10:17:14 +05:30
Added rotateRefreshTokens() method
This commit is contained in:
parent
8c4019693b
commit
2552b73b17
@ -54,6 +54,12 @@ class RefreshToken implements GrantTypeInterface {
|
|||||||
*/
|
*/
|
||||||
protected $refreshTokenTTL = 604800;
|
protected $refreshTokenTTL = 604800;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rotate refresh tokens
|
||||||
|
* @var boolean
|
||||||
|
*/
|
||||||
|
protected $rotateRefreshTokens = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
* @param Authorization $authServer Authorization server instance
|
* @param Authorization $authServer Authorization server instance
|
||||||
@ -111,6 +117,16 @@ class RefreshToken implements GrantTypeInterface {
|
|||||||
return $this->refreshTokenTTL;
|
return $this->refreshTokenTTL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When a new access is token, expire the refresh token used and issue a new one.
|
||||||
|
* @param boolean $rotateRefreshTokens Set to true to enable (default = false)
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function rotateRefreshTokens($rotateRefreshTokens = false)
|
||||||
|
{
|
||||||
|
$this->rotateRefreshTokens = $rotateRefreshTokens
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Complete the refresh token grant
|
* Complete the refresh token grant
|
||||||
* @param null|array $inputParams
|
* @param null|array $inputParams
|
||||||
|
Loading…
x
Reference in New Issue
Block a user