public function refresh()
    {
        if (isset($this->token['refresh_token'])) {
            $Endpoint = $this->getActionEndpoint(self::ACTION_OAUTH_REFRESH);
            if ($Endpoint !== null) {
                $Endpoint = $this->configureEndpoint($Endpoint, self::ACTION_OAUTH_REFRESH);
                $response = $Endpoint->execute()->getResponse();
                if ($response->getStatus() == '200') {
                    //@codeCoverageIgnoreStart
                    $this->setToken($response->getBody());
                    return TRUE;
                }
                //@codeCoverageIgnoreEnd
            }
        }
        return FALSE;
    }
public function refresh()
    {
        if (isset($this->token['refresh_token'])) {
            $Endpoint = $this->getActionEndpoint(self::ACTION_OAUTH_REFRESH);
            if ($Endpoint !== null) {
                $Endpoint = $this->configureEndpoint($Endpoint, self::ACTION_OAUTH_REFRESH);
                $response = $Endpoint->execute()->getResponse();
                if ($response->getStatus() == '200') {
                    //@codeCoverageIgnoreStart
                    $this->setToken($response->getBody());
                    return TRUE;
                }
                //@codeCoverageIgnoreEnd
            }
        }
        return FALSE;
    }
public function refresh ( ) { if ( isset ( $ this -> token [ 'refresh_token' ] ) ) { $ Endpoint = $ this -> getActionEndpoint ( self :: ACTION_OAUTH_REFRESH ) ; if ( $ Endpoint !== null ) { $ Endpoint = $ this -> configureEndpoint ( $ Endpoint , self :: ACTION_OAUTH_REFRESH ) ; $ response = $ Endpoint -> execute ( ) -> getResponse ( ) ; if ( $ response -> getStatus ( ) == '200' ) { //@codeCoverageIgnoreStart $ this -> setToken ( $ response -> getBody ( ) ) ; return TRUE ; } //@codeCoverageIgnoreEnd } } return FALSE ; }
Refreshes the OAuth 2 Token
@return bool
@throws InvalidToken
Refreshes the OAuth 2 Token