Phpcas logon jump issue // Import casrequire_once ("CAS. php "); phpCAS: client (CAS_VERSION_2_0, 'localhost', 8443, 'Cas ', true); phpCAS: setNoCasServerValidati phpcas logon redirection
// Import casrequire_once ("CAS. php "); phpCAS: client (CAS_VERSION_2_0, 'localhost', 8443, 'Cas ', true); phpCAS: setNoCasServerValidation (); phpCAS: forceAuthentication (); if (phpCAS: isAuthenticated () = true) {echo phpCAS: getUser () ;}else {echo "abc ";}? I have added this code to all php headers. Is equivalent to the filter in java .?
Now the problem arises. if I do not have the authentication, the php page will jump to the cas logon page when accessing the php page. my current requirements are :?
You can access the php page no matter whether you log on or not. 1. if you have logged on, the user name is displayed. 2. if you have not logged on, abc is printed .?
The above code only meets the first point, and the second point does not. How can this be implemented?
1 floor cstarclear 2011-09-15 phpCAS: forceAuthentication ();
Just remove this sentence.