CAS SSO integrated java + PHP (Discuz,bbs) equipped with

Source: Internet
Author: User
Tags http authentication
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?
  • Related Article

    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.