Iv. Remember that the result of a failed CAS setup is always so damaging (client)

Source: Internet
Author: User

========================================================== ========================================================== ======================================

Setp4: bind Tomcat to the cas server: For details, refer to: Baidu, Google, search .....

========================================================== ========================================================== ======================================

1. the PHP client is used for urination, And the PHP client is used for urination. First, download a php client program from the cas download site.

Address:Http://downloads.jasig.org/cas-clients/php/ version a lot, the basic choice of a back, that is, the latest can be!

2. decompress the file to the root directory of your website. Of course, you can also choose another directory. If there is a file named "CAS. php files prove that you downloaded the correct package

3. Create a new file "index. php"

<? Phpinclude_once ('cas. php '); // introduce the cas entry file phpCAS: setDebug (); // set the log: The log will generate a file named "phpCAS" in your program directory. log "log File phpCAS: client (CAS_VERSION_2_0, 'localhost', 8443, 'cas '); // connection/* Note that the localhost here is for your cas server. Because I am on the same computer, it is localhost * 8443: the port * cas set for tomcat for cas: If you configure it according to the previous steps, here is cas */phpCAS: setNoCasServerValidation (); phpCAS: handleLogoutRequests (); // obtain whether the server has exited phpCAS: forceAuthentication (); // verify if (isset ($ _ REQUEST ['Logout']) {phpCAS: logout () ;}?>

4. Open the browser and run: http: // 127.0.0.1/index. php.

If you see this interface, it proves that you can log on to the account normally. | after the password is logged on, it will jump back to 127.0.0.1! We started logging in.

Logon result:

At this time, if we directly log on to the server: the client can see this interface without logon. If we log on to the client, the server will also log on!

But now the problem seems to be above the verification. Single-point login seems to be successful, but once it reaches the php verification stage, it will not be able to pass!

PhpCAS: forceAuthentication (); // the following error is reported during verification: CAS Authentication failed! You were not authenticated. you may submit your request again by clicking here. if the problem persists, you may contact the administrator of this site. phpCAS 1.2.0RC2 using server https: // localhost: 8443/cas/(CAS 2.0)

If you know this question, please leave a message or reply to me. Thank you very much.

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.