大家好,欢迎来到IT知识分享网。
- <!– CAS 单点登录(SSO) 过滤器配置 (start) –>
- <!– 该过滤器用于实现单点登出功能。–>
- <filter>
- <filter-name>CAS Single Sign Out Filter</filter-name>
- <filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>CAS Single Sign Out Filter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
- <!– CAS: 用于单点退出 –>
- <listener>
- <listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class>
- </listener>
- <!– 该过滤器负责用户的认证工作,必须启用它 –>
- <filter>
- <filter-name>CASFilter</filter-name>
- <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
- <init-param>
- <param-name>casServerLoginUrl</param-name>
- <!– 下面的URL是Cas服务器的登录地址 –>
- <param-value>http://CAS服务端所在服务器IP:8080/cas/login</param-value>
- </init-param>
- <init-param>
- <param-name>serverName</param-name>
- <!– 下面的URL是具体某一个应用的访问地址 –>
- <param-value>http://具体web应用程序所在服务器IP:8080</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <filter-name>CASFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
- <!– 该过滤器负责对Ticket的校验工作,必须启用它 –>
- <filter>
- <filter-name>CAS Validation Filter</filter-name>
- <filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class>
- <init-param>
- <param-name>casServerUrlPrefix</param-name>
- <!– 下面的URL是Cas服务器的认证地址 –>
- <param-value>http://CAS服务端所在服务器IP:8080/cas</param-value>
- </init-param>
- <init-param>
- <param-name>serverName</param-name>
- <!– 下面的URL是具体某一个应用的访问地址 –>
- <param-value>http://具体web应用程序所在服务器IP:8080</param-value>
- </init-param>
- <init-param>
- <param-name>renew</param-name>
- <param-value>false</param-value>
- </init-param>
- <init-param>
- <param-name>gateway</param-name>
- <param-value>false</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <filter-name>CAS Validation Filter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
- <!–
- 该过滤器负责实现HttpServletRequest请求的包裹,
- 比如允许开发者通过HttpServletRequest的getRemoteUser()方法获得SSO登录用户的登录名,可选配置。
- —>
- <filter>
- <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
- <filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
- <!–
- 该过滤器使得开发者可以通过org.jasig.cas.client.util.AssertionHolder来获取用户的登录名。
- 比如AssertionHolder.getAssertion().getPrincipal().getName()。
- —>
- <filter>
- <filter-name>CAS Assertion Thread Local Filter</filter-name>
- <filter-class>org.jasig.cas.client.util.AssertionThreadLocalFilter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>CAS Assertion Thread Local Filter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
- <!– 自动根据单点登录的结果设置本系统的用户信息(具体某一个应用实现) –>
- <filter>
- <filter-name>CasForInvokeContextFilter</filter-name>
- <filter-class>com.cm.demo.filter.CasForInvokeContextFilter</filter-class>
- <init-param>
- <param-name>appId</param-name>
- <param-value>a5ea611bbff7474a81753697a1714fb0</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <filter-name>CasForInvokeContextFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
- <!– CAS 单点登录(SSO) 过滤器配置 (end) –>
免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/23512.html