public function get_logout_link($returnTo = null, $client_id = null, $federated = false)
    {
        $params = [];

        if ($returnTo !== null) {
            $params['returnTo'] = $returnTo;
        }

        if ($client_id !== null) {
            $params['client_id'] = $client_id;
        }

        if ($federated) {
            $params['federated'] = '';
        }

        return sprintf(
            'https://%s/v2/logout?%s',
            $this->domain,
            Psr7\build_query($params)
        );
    }