Phpcas::handlelogoutrequests () on the Java-side project logout and the PHP-side project does not detect the test

Source: Internet
Author: User
Tags cas

First of all, if you have a CAs, and if you have a PHP project in the CAs, this time to let the PHP project has the CAS SSO function, you need to transform your project, because each individual project is different, but the principle is similar, all through the CAS server to obtain Session_ticket, Then according to the ticket to the CAS server to obtain user information and into the project log in.

PHP's CAS client phpcas can do this, but a pit is casphp::handlelogoutrequests () This function is used to check the Java side logout when the PHP side also exits, If you do not look at the casphp source, you will not know how big the pit of this function is.

First, if you use Casphp::handlelogoutrequests () directly to determine the Java side exit and PHP side exit, if your project is not on the public network, so no problem, but if your project is on the public network, This function will make an error (see your Phpcas.log file for information) and will show no logout request in the diary. By looking at the source code you know that you need to set casphp::handlelogoutrequests () to Casphp::handlelogoutrequests (True,array ("Java Project Server IP")); This phpcas will intercept the log out of the information, and then log out, but this is just the CAS server logout, your own PHP project to modify the code according to the circumstances of your own project, I was judged by Phpcas:: Checkxxxx () The return value of this method to modify the logout logic code.

The above is for reference only!

Phpcas::handlelogoutrequests () on the Java-side project logout and the PHP-side project does not detect the test

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.