• cas配置不通过登陆校验的页面


    项目中的单点登录是通过CAS配置的,如果是未登录状态,那么请求在通过CAS过滤器校验时会转向登陆页面,无法通过访问类似http://localhost:8080/portal/business-plugin/charge/rfgl/pay/showPayList.jsp的方式访问到项目中的静态资源。现要开放一个页面给第三方,仅用于数据查阅,需要去掉该页面的校验,方法如下:

      <filter>
        <filter-name>CASFilter</filter-name>
        <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
        <init-param>
          <param-name>casServerLoginUrl</param-name>
          <!-- cas路径 -->
          <param-value>http://localhost:8080/cas/login</param-value>
        </init-param>
        <init-param>
          <param-name>serverName</param-name>
          <!-- 业务系统路径 -->
          <param-value>http://localhost:8080</param-value>
        </init-param>
        <init-param>
        <!-- 不需通过校验的请求资源,用正则表达式表示 -->
            <param-name>ignorePattern</param-name>  
            <param-value>/js/*|/business-plugin/charge/charge-resource/images/*|/restful/*|business-plugin/charge/rfgl/pay/showPayList.jsp</param-value>
        </init-param>
      </filter>
      <filter-mapping>
        <filter-name>CASFilter</filter-name>
        <url-pattern>/*</url-pattern>
      </filter-mapping>
  • 相关阅读:
    curl常用选项
    cuda
    mysql 备份文件.xbstream 恢复到本地
    firewall 常用命令(update...)
    ownCloud 研究笔记(update...)
    V3
    English trip EM3-LP-3A ROOMMATES Teacher:Corrine
    V3
    English trip EM3-LP-5A Shopping Teacher:Taylor
    新概念 Lesson 11 Which book?
  • 原文地址:https://www.cnblogs.com/zjfjava/p/9857984.html
Copyright © 2020-2023  润新知