CAS_Client::redirectToCas PHP Метод

redirectToCas() публичный Метод

It is used by CAS_Client::forceAuthentication() and CAS_Client::checkAuthentication().
public redirectToCas ( boolean $gateway = false, boolean $renew = false ) : void
$gateway boolean true to check authentication, false to force it
$renew boolean true to force the authentication with the CAS server
Результат void
    public function redirectToCas($gateway = false, $renew = false)
    {
        phpCAS::traceBegin();
        $cas_url = $this->getServerLoginURL($gateway, $renew);
        session_write_close();
        if (php_sapi_name() === 'cli') {
            @header('Location: ' . $cas_url);
        } else {
            header('Location: ' . $cas_url);
        }
        phpCAS::trace("Redirect to : " . $cas_url);
        $lang = $this->getLangObj();
        $this->printHTMLHeader($lang->getAuthenticationWanted());
        printf('<p>' . $lang->getShouldHaveBeenRedirected() . '</p>', $cas_url);
        $this->printHTMLFooter();
        phpCAS::traceExit();
        throw new CAS_GracefullTerminationException();
    }
CAS_Client