public function forceAuthentication()
{
phpCAS::traceBegin();
if ($this->isAuthenticated()) {
// the user is authenticated, nothing to be done.
phpCAS::trace('no need to authenticate');
$res = true;
} else {
// the user is not authenticated, redirect to the CAS server
if (isset($_SESSION['phpCAS']['auth_checked'])) {
unset($_SESSION['phpCAS']['auth_checked']);
}
$this->redirectToCas(false);
// never reached
$res = false;
}
phpCAS::traceEnd($res);
return $res;
}