src/AuthorizesWithOAuth2.php
public function getTokenByRefreshTokenGrant(AccessToken $oldToken)
    {
        try {
            $token = $this->getAuthorizationServer()->getAccessToken('refresh_token', [
                'refresh_token' => $oldToken->getRefreshToken(),
                'scope' => $this->config[$this->grant]['scope'],
            ]);

            $this->getFrameworkBridge()->persistUserToken($token);

            return $token;
        } catch (IdentityProviderException $e) {
            $this->getFrameworkBridge()->requestUserCredentials();

            return null;
        }
    }
public function getTokenByRefreshTokenGrant(AccessToken $oldToken)
    {
        try {
            $token = $this->getAuthorizationServer()->getAccessToken('refresh_token', [
                'refresh_token' => $oldToken->getRefreshToken(),
                'scope' => $this->config[$this->grant]['scope'],
            ]);

            $this->getFrameworkBridge()->persistUserToken($token);

            return $token;
        } catch (IdentityProviderException $e) {
            $this->getFrameworkBridge()->requestUserCredentials();

            return null;
        }
    }
public function getTokenByRefreshTokenGrant ( AccessToken $ oldToken ) { try { $ token = $ this -> getAuthorizationServer ( ) -> getAccessToken ( 'refresh_token' , [ 'refresh_token' => $ oldToken -> getRefreshToken ( ) , 'scope' => $ this -> config [ $ this -> grant ] [ 'scope' ] , ] ) ; $ this -> getFrameworkBridge ( ) -> persistUserToken ( $ token ) ; return $ token ; } catch ( IdentityProviderException $ e ) { $ this -> getFrameworkBridge ( ) -> requestUserCredentials ( ) ; return null ; } }
Re-authorize a user based on their stored refresh token.

@param AccessToken $oldToken
@return AccessToken
Re - authorize a user based on their stored refresh token .