有关cas单点登录中,web.xml配置文件中过滤器的配置问题
gkgln 2016-12-16 08:37:10 http://blog.csdn.net/rogerjava/article/details/6555175
这个链接中的博主采用的是:
<filter-class>
edu.yale.its.tp.cas.client.filter.CASFilter
</filter-class>
这个过滤器。
而在许多其他文档中,有许多配置的过滤器是:
<filter>
<filter-name>CAS Authentication Filter</filter-name>
<filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
<init-param>
<param-name>casServerLoginUrl</param-name>
<param-value>http://localhost:8080/casweb/login</param-value>
</init-param>
</filter>
而在官方文档中中:https://wiki.jasig.org/display/CASC/Using+CASFilter
对于第一种过滤器,有一句解释:In this case, any URL beneath /webapp/cas-protected would require a CAS login. If you want to protect your entire web application, you can simply put /* for the URL pattern
可以看出重点是需要登录
而第二种过滤器,在这篇文章中:http://www.cnblogs.com/davidwang456/p/3962786.html
有一句解释;The AuthenticationFilter is what detects whether a user needs to be authenticated or not. If a user needs to be authenticated, it will redirect the user to the CAS server.
是用来判断一个用户是否需要认证,如果用户需要认证,则重定向这个用户跳转到cas服务器
到现在我也没区分开这两个过滤器之间的关系,有大牛能帮忙解答一下吗。