CAS SSO integrated java + PHP (DISCUZ,BBS) configuration
CAS Construction Preparation:
cas-server-3.4.4
cas-client-3.2.0
apache-tomcat-6.0.14
?
Remove HTTPS authentication and change to HTTP authentication
1. Enter the Web-inf\spring-configuration directory
Open Warncookiegenerator.xml File
Modify the value of P:cookiesecure to False
2. Open Ticketgrantingticketcookiegenerator.xml File
Also modifies the value of P:cookiesecure to False
3. Open Web-inf\deployerconfigcontext.xml File
Find Org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler
Modify this code block to read as follows: (add P:requiresecure= "false"?)
?
Java Client Configuration
Org.jasig.cas.client.session.SingleSignOutHttpSessionListener
CAS Single Sign out
Filter
org.jasig.cas.client.session.SingleSignOutFilter
CAS
Single Sign Out Filter/*
casfilter
org.jasig.cas.client.authentication.AuthenticationFilter
Casserverlogi Nurl
http://116.226.60.173:8888/cas/login
serverName
http://116 .226.60.173:8888
casfilter
/front/member/*
casfilter
/membercenter/*
CAS Validation Filter
org.jasig.cas.client.validation.Cas20ProxyReceivingTicketVal Idationfilter
casserverurlprefix
http://116.226.60.173:8888/cas
s Ervername
http://116.226.60.173:8888
CAS Validation Filter
/
*
CAS httpservletrequest Wrapper Filter
org.jasig.cas.client.util.HttpServletRequest Wrapperfilter
CAS httpservletrequest Wrapper Filter
/
*
CAS Assertion Thread Local Filter
org.jasig.cas.client.util.AssertionThreadLocalFilter
CAS Assertion Thread Local Filter
/
*
?
?
?
PHP-Side configuration
Require_once ' cas.php ';d efine (' Cas_server_hostname ', "192.168.18.8"); Define (' Cas_server_port ', 8888); Define (' Cas_server_app_name ', "CAS"); Phpcas::setdebug ();p hpcas::client (Cas_version_2_0, Cas_server_hostname, Cas_server_port, CAS_SERVER_APP_NAME); Phpcas::setnocasservervalidation ();p hpcas::handlelogoutrequests (); Phpcas::forceauthentication (); $username = Phpcas::getuser (); Get the CAS server user name?