protected function redirectToCas($gateway = false)
    {
        $query['service'] = self::getDefaultService();
        if ($gateway) {
            $query['gateway'] = 'true';
        }
        self::http_redirect($this->server['login_url'] . '?' . http_build_query($query));
        // never reached
        return true;
    }