CAS实战(cas-server-3.3.4 + cas-client-3.1.3)八

阅读更多

3.1.3的配置

下面是3.1.3版本的配置方式,我目前使用的就是3.1.3

我的子系统和CAS服务器是在2tomcat,2tomcat分别使用不同的JDK(2JDK都得导入密钥,否则会无法认证通过,CAS无响应错误,当然用同一个JDK也是可以的)CSA服务器是用的8080端口,HTTPS 8443端口,子系统使用的是9090端口

同样,打开子系统的web.xml,增加如下配置:

 

<filter>

<filter-name>CAS Authentication Filterfilter-name>        <filter-class>org.jasig.cas.client.authentication.AuthenticationFilterfilter-class>

         

        <init-param>

            <param-name>casServerLoginUrlparam-name>

            <param-value>https://casserver:8443/cas/loginparam-value>

        init-param>

        <init-param> 

            <param-name>renewparam-name> 

            <param-value>falseparam-value> 

        init-param> 

        <init-param> 

            <param-name>gatewayparam-name> 

            <param-value>falseparam-value> 

        init-param> 

         

        <init-param> 

            <param-name>serverNameparam-name> 

            <param-value>http://server1:9090param-value> 

        init-param>

    filter>

 

     

    <filter> 

<filter-name>CAS Validation Filterfilter-name>        <filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilterfilter-class> 

        <init-param> 

            <param-name>casServerUrlPrefixparam-name> 

           

            <param-value>https://casserver:8443/casTestparam-value> 

        init-param>

        <init-param>

           <param-name>serverNameparam-name>

           <param-value>http://server1:9090param-value>

       init-param>

       <init-param>

           <param-name>useSessionparam-name>

           <param-value>trueparam-value>

       init-param>

       <init-param>

           <param-name>redirectAfterValidationparam-name>

           <param-value>trueparam-value>

       init-param>        

    filter>

   

    <filter>

        <filter-name>CAS HttpServletRequest WrapperFilterfilter-name>

<filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilterfilter-class>

    filter>

   

    <filter>

<filter-name>CAS Assertion Thread Local Filterfilter-name>

<filter-class>org.jasig.cas.client.util.AssertionThreadLocalFilterfilter-class>

    filter>

 

    <filter-mapping> 

       <filter-name>CAS Authentication Filterfilter-name> 

        <url-pattern>/*url-pattern> 

    filter-mapping> 

   

    <filter-mapping> 

        <filter-name>CAS Validation Filterfilter-name> 

        <url-pattern>/*url-pattern> 

    filter-mapping>   

   

    <filter-mapping> 

        <filter-name>CAS HttpServletRequest Wrapper Filterfilter-name> 

        <url-pattern>/*url-pattern> 

    filter-mapping> 

   

    <filter-mapping> 

        <filter-name>CAS Assertion Thread Local Filterfilter-name> 

        <url-pattern>/*url-pattern> 

    filter-mapping>  

    

 

你可能感兴趣的:(+)