=========================================================================================================
Setp4:tomcat and CAS Server binding operation:: Reference: Baidu, Google, search .....
=========================================================================================================
1, the use of urine is a PHP client, urine will only PHP, first from the CAS download site down a PHP version of the client program
Address:http://downloads.jasig.org/cas-clients/php/version of a lot, the basic choice of a back, that is, the latest can!
2, the files extracted to your site root directory, of course, other directories can also, whatever you decide, if there is a file called "cas.php", it proves that you download should be the right package
3. Create a new file "index.php"
PHPinclude_once(' cas.php '); // Introduction of CAS entry file phpcas::setdebug (); // set log:: Log will generate a log file called "PhpCAS.log" in your program directory phpcas::client (cas_version_2_0, ' localhost ', 8443, ' CAS '); // Connection /* */phpcas::setnocasservervalidation ();p hpcas:: Handlelogoutrequests ( ); // gets whether the server has exited phpcas::forceauthentication (); // Validation if (isset($_request[' logout ')) { Phpcas::logout ();}? >
4. Open Browser, run:http://127.0.0.1/index.php
If you see this interface, prove that you can log in normally, account | Password login, you will jump back to 127.0.0.1! We're landing.
Login Result:
This time if we on the server directly login: The client does not have to login to see this interface, if the client login, the server will follow the landing!
But now the problem seems to be in the verification above, the single point of landing seems to be successful, but one to the PHP verification phase, will not get through!
Phpcas::forceauthentication (); // error when verifying. The error content is as follows: CAS authentication failed! You were not authenticated. You may submit a your request again by clicking. If The problem persists, the contact the administrator for this site. 1.2.0rc2 Using server https://localhost:8443/cas/(CAS 2.0)
If you know this problem, please give me a message or reply, thank you
http://www.bkjia.com/PHPjc/818149.html www.bkjia.com true http://www.bkjia.com/PHPjc/818149.html techarticle ========================================================================================================= SETP4:TOMCA T binds to the CAS server:: Reference: Baidu, Google 、...