mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-02-03 09:20:05 +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;
|
||||
|
||||
/**
|
||||
* Rotate refresh tokens
|
||||
* @var boolean
|
||||
*/
|
||||
protected $rotateRefreshTokens = false;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param Authorization $authServer Authorization server instance
|
||||
@ -111,6 +117,16 @@ class RefreshToken implements GrantTypeInterface {
|
||||
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
|
||||
* @param null|array $inputParams
|
||||
|
Loading…
x
Reference in New Issue
Block a user