mirror of
				https://github.com/elyby/oauth2-server.git
				synced 2025-05-31 14:12:07 +05:30 
			
		
		
		
	Added rotateRefreshTokens() method
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user