四、配置客户端

                   1、添加客户端到你的项目中

                          ·手动下载下载cas-client,地址:http://www.ja-sig.org/downloads/cas-clients/,然后解压cas-client-3.1.12.zip,在modules文件夹中有需要的jar包,                         请根据自己的项目情况选择使用,把相应的jar包放到你项目WEB-INF/lib下。

                   ·使用maven

                              

 

 

    org.jasig.cas.client  

    cas-client-core  

    3.1.12  

 

                2、在客户端项目的web.xml配置过滤器

                        

 

     

     

        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  

         

            casServerLoginUrl  

            https://www.travel.com:8443/cas/login  

             

         

         

            serverName  

            http://www.travel.com:8080  

         

     

     

        CASFilter  

        /*  

     

  

     

     

        CAS Validation Filter  

         

            org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter  

         

            casServerUrlPrefix  

            https://www.travel.com:8443/cas  

         

         

            serverName  

            http://www.travel.com:8080    

         

     

     

        CAS Validation Filter  

        /*  

     

  

     

     

        CAS HttpServletRequest Wrapper Filter  

         

            org.jasig.cas.client.util.HttpServletRequestWrapperFilter  

     

     

        CAS HttpServletRequest Wrapper Filter  

        /*  

     

  

     

     

        CAS Assertion Thread Local Filter  

        org.jasig.cas.client.util.AssertionThreadLocalFilter  

     

     

        CAS Assertion Thread Local Filter  

        /*  

     

  

     

             

 

   五、常见问题说明

                  错误一、

                           

         :你在客户端的web.xml中①,②的配置有误。

             错误二

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException:   

PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:   

unable to find valid certification path to requested target  

                  若出现次错误是有与你客户端的证书有问题重新导入你证书