• 测试单点登录xml配置


    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5">
    <!-- 用于单点退出,该过滤器用于实现单点登出功能,可选配置 -->
    <listener>
    <listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class>
    </listener>
    <!-- 该过滤器用于实现单点登出功能,可选配置。 -->
    <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>
    <!-- 该过滤器负责用户的认证工作,必须启用它 -->
    <filter>
    <filter-name>CASFilter</filter-name>
    <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
    <init-param>
    <param-name>casServerLoginUrl</param-name>
    <param-value>http://192.168.200.128:9100/cas/login</param-value>
    <!--这里的server是服务端的IP -->
    </init-param>
    <init-param>
    <param-name>serverName</param-name>
    <param-value>http://localhost:9001</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>
    <param-value>http://192.168.200.128:9100/cas</param-value>
    </init-param>
    <init-param>
    <param-name>serverName</param-name>
    <param-value>http://localhost:9001</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>
    </web-app>

  • 相关阅读:
    从PowerDesigner概念设计模型(CDM)中的3种实体关系说起
    详细整数分区的问题解释
    JavaWeb显示器
    mysql中国的内容php网页乱码问题
    Linux开发环境的搭建和使用——Linux本必备软件SSH
    【Android UI设计和开发】动画(Animation)详细说明(一)
    应该是什么在预新手发“外链”(4)最终的外链的方法
    选择29部分有用jQuery应用程序插件(免费点数下载)
    设计模式--装饰图案
    Webserver管理系列:3、Windows Update
  • 原文地址:https://www.cnblogs.com/lijun6/p/11954232.html
Copyright © 2020-2023  润新知