Phpcas logon redirection problems

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.