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/* no gateway */);
            // never reached
            $res = false;
        }
        phpCAS::traceEnd($res);
        return $res;
    }
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/* no gateway */);
            // never reached
            $res = false;
        }
        phpCAS::traceEnd($res);
        return $res;
    }
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 /* no gateway */ ) ; // never reached $ res = false ; } phpCAS :: traceEnd ( $ res ) ; return $ res ; }
This method is called to be sure that the user is authenticated. When not
authenticated, halt by redirecting to the CAS server; otherwise return true.

@return true when the user is authenticated; otherwise halt.
This method is called to be sure that the user is authenticated . When not authenticated halt by redirecting to the CAS server ; otherwise return true .