Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
smileNicky
jeeplatform
提交
16de250f
J
jeeplatform
项目概览
smileNicky
/
jeeplatform
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
5
列表
看板
标记
里程碑
合并请求
4
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jeeplatform
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
5
Issue
5
列表
看板
标记
里程碑
合并请求
4
合并请求
4
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
16de250f
编写于
5月 19, 2019
作者:
N
Nicky.Ma
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:客户端先暂时接入CAS单点登录
上级
7b5a38c4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
191 addition
and
103 deletion
+191
-103
code/jeeplatform-admin/pom.xml
code/jeeplatform-admin/pom.xml
+7
-0
code/jeeplatform-admin/src/main/java/org/muses/jeeplatform/web/filter/CASFilter.java
...main/java/org/muses/jeeplatform/web/filter/CASFilter.java
+20
-0
code/jeeplatform-admin/src/main/resources/application-dev.yml
.../jeeplatform-admin/src/main/resources/application-dev.yml
+1
-1
code/jeeplatform-admin/src/main/webapp/WEB-INF/web.xml
code/jeeplatform-admin/src/main/webapp/WEB-INF/web.xml
+163
-102
未找到文件。
code/jeeplatform-admin/pom.xml
浏览文件 @
16de250f
...
...
@@ -16,6 +16,7 @@
<shiro.version>
1.2.3
</shiro.version>
<lucene.version>
4.7.2
</lucene.version>
<poi.version>
3.7
</poi.version>
<cas.version>
3.2.0
</cas.version>
</properties>
<dependencies>
...
...
@@ -81,6 +82,12 @@
<version>
2.5
</version>
</dependency>
<dependency>
<groupId>
org.jasig.cas.client
</groupId>
<artifactId>
cas-client-core
</artifactId>
<version>
${cas.version}
</version>
</dependency>
</dependencies>
...
...
code/jeeplatform-admin/src/main/java/org/muses/jeeplatform/web/filter/CASFilter.java
0 → 100644
浏览文件 @
16de250f
package
org.muses.jeeplatform.web.filter
;
import
org.jasig.cas.client.authentication.AuthenticationFilter
;
/**
* <pre>
* CAS认证Filter
* </pre>
*
* @author nicky
* <pre>
* 修改记录
* 修改后版本: 修改人: 修改日期: 2019年05月19日 修改内容:
* </pre>
*/
public
class
CASFilter
extends
AuthenticationFilter
{
}
code/jeeplatform-admin/src/main/resources/application-dev.yml
浏览文件 @
16de250f
server
:
port
:
808
0
port
:
808
1
spring
:
...
...
code/jeeplatform-admin/src/main/webapp/WEB-INF/web.xml
浏览文件 @
16de250f
<
!--<?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" id="WebApp_ID" version="2.5">--
>
<
!--<display-name>Archetype Created Web Application</display-name>--
>
<
?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"
id=
"WebApp_ID"
version=
"2.5"
>
<
display-name>
Archetype Created Web Application
</display-name
>
<
!--<welcome-file-list>--
>
<
!--<welcome-file>index.jsp</welcome-file>--
>
<
!--</welcome-file-list>--
>
<
welcome-file-list
>
<
welcome-file>
index.jsp
</welcome-file
>
<
/welcome-file-list
>
<!--<context-param>
-->
<
!--<param-name>contextConfigLocation</param-name>--
>
<
!--<param-value>classpath:spring/spring-base.xml</param-value>--
>
<
!--</context-param>--
>
<
!--<context-param>--
>
<
!--<param-name>log4jConfigLocation</param-name>--
>
<
!--<param-value>classpath:log4j.properties</param-value>--
>
<
!--</context-param>--
>
<!--<context-param>
<
param-name>contextConfigLocation</param-name
>
<
param-value>classpath:spring/spring-base.xml</param-value
>
<
/context-param
>
<
context-param
>
<
param-name>log4jConfigLocation</param-name
>
<
param-value>classpath:log4j.properties</param-value
>
<
/context-param
>
<
!--<filter>--
>
<
!--<filter-name>encodingFilter</filter-name>--
>
<
!--<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>--
>
<
!--<init-param>--
>
<
!--<param-name>encoding</param-name>--
>
<
!--<param-value>utf-8</param-value>--
>
<
!--</init-param>--
>
<
!--<init-param>--
>
<
!--<param-name>forceEncoding</param-name>--
>
<
!--<param-value>true</param-value> <!– 配置forceEncoding为true,请求和响应的数据的字符集均使用当前配置的字符集–>-->
<
!--</init-param>--
>
<
!--</filter>--
>
<
!--<filter-mapping>--
>
<
!--<filter-name>encodingFilter</filter-name>--
>
<
!--<url-pattern>/*</url-pattern>--
>
<
!--</filter-mapping>--
>
<
filter
>
<
filter-name>encodingFilter</filter-name
>
<
filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class
>
<
init-param
>
<
param-name>encoding</param-name
>
<
param-value>utf-8</param-value
>
<
/init-param
>
<
init-param
>
<
param-name>forceEncoding</param-name
>
<
param-value>true</param-value> <!– 配置forceEncoding为true,请求和响应的数据的字符集均使用当前配置的字符集–>
<
/init-param
>
<
/filter
>
<
filter-mapping
>
<
filter-name>encodingFilter</filter-name
>
<
url-pattern>/*</url-pattern
>
<
/filter-mapping
>
<!--<!– 添加SSI(服务端页面包含技术)配置 start-->
<!--<servlet>-->
<!--<servlet-name>ssi</servlet-name>-->
<!--<servlet-class>org.apache.catalina.ssi.SSIServlet</servlet-class>-->
<!--</servlet>-->
<!--<servlet-mapping>-->
<!--<servlet-name>ssi</servlet-name>-->
<!--<url-pattern>*.shtml</url-pattern>-->
<!--</servlet-mapping>-->
<!--–>-->
<!--<!– 添加SSI(服务端页面包含技术)配置 end –>-->
<!– 添加SSI(服务端页面包含技术)配置 start –>
<servlet>
<servlet-name>ssi</servlet-name>
<servlet-class>org.apache.catalina.ssi.SSIServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ssi</servlet-name>
<url-pattern>*.shtml</url-pattern>
</servlet-mapping>
<!– 添加SSI(服务端页面包含技术)配置 end –>
<!--<!– 连接池 启用Web监控统计功能 start–>-->
<
!--<filter>--
>
<
!--<filter-name>DruidWebStatFilter</filter-name>--
>
<
!--<filter-class>com.alibaba.druid.support.http.WebStatFilter</filter-class>--
>
<
!--<init-param>--
>
<
!--<param-name>exclusions</param-name>--
>
<
!--<param-value>*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*</param-value>--
>
<
!--</init-param>--
>
<
!--</filter>--
>
<
!--<filter-mapping>--
>
<
!--<filter-name>DruidWebStatFilter</filter-name>--
>
<
!--<url-pattern>/*</url-pattern>--
>
<
!--</filter-mapping>--
>
<
!--<servlet>--
>
<
!--<servlet-name>DruidStatView</servlet-name>--
>
<
!--<servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>--
>
<
!--</servlet>--
>
<
!--<servlet-mapping>--
>
<
!--<servlet-name>DruidStatView</servlet-name>--
>
<
!--<url-pattern>/druid/*</url-pattern>--
>
<
!--</servlet-mapping>--
>
<!--<!– 连接池 启用Web监控统计功能 end–>-->
<!– 连接池 启用Web监控统计功能 start–>
<
filter
>
<
filter-name>DruidWebStatFilter</filter-name
>
<
filter-class>com.alibaba.druid.support.http.WebStatFilter</filter-class
>
<
init-param
>
<
param-name>exclusions</param-name
>
<
param-value>*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*</param-value
>
<
/init-param
>
<
/filter
>
<
filter-mapping
>
<
filter-name>DruidWebStatFilter</filter-name
>
<
url-pattern>/*</url-pattern
>
<
/filter-mapping
>
<
servlet
>
<
servlet-name>DruidStatView</servlet-name
>
<
servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class
>
<
/servlet
>
<
servlet-mapping
>
<
servlet-name>DruidStatView</servlet-name
>
<
url-pattern>/druid/*</url-pattern
>
<
/servlet-mapping
>
<!– 连接池 启用Web监控统计功能 end–>
<
!--<listener>--
>
<
!--<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>--
>
<
!--</listener>--
>
<
!--<listener>--
>
<
!--<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>--
>
<
!--</listener>--
>
<
listener
>
<
listener-class>org.springframework.web.util.Log4jConfigListener</listener-class
>
<
/listener
>
<
listener
>
<
listener-class>org.springframework.web.context.ContextLoaderListener</listener-class
>
<
/listener
>
<
!--<servlet>--
>
<
!--<servlet-name>springMvc</servlet-name>--
>
<
!--<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>--
>
<
!--<init-param>--
>
<
!--<param-name>contextConfigLocation</param-name>--
>
<
!--<param-value>classpath:spring/spring-mvc.xml</param-value>--
>
<
!--</init-param>--
>
<
!--<load-on-startup>1</load-on-startup>--
>
<
!--</servlet>--
>
<
!--<servlet-mapping>--
>
<
!--<servlet-name>springMvc</servlet-name>--
>
<
!--<url-pattern>/</url-pattern>--
>
<
!--</servlet-mapping>--
>
<
servlet
>
<
servlet-name>springMvc</servlet-name
>
<
servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class
>
<
init-param
>
<
param-name>contextConfigLocation</param-name
>
<
param-value>classpath:spring/spring-mvc.xml</param-value
>
<
/init-param
>
<
load-on-startup>1</load-on-startup
>
<
/servlet
>
<
servlet-mapping
>
<
servlet-name>springMvc</servlet-name
>
<
url-pattern>/</url-pattern
>
<
/servlet-mapping
>
<!--<!– Shiro过滤器配置 start –>-->
<
!--<filter>--
>
<
!--<filter-name>shiroFilter</filter-name>--
>
<
!--<filter-class>--
>
<!--org.springframework.web.filter.DelegatingFilterProxy-->
<
!--</filter-class>--
>
<
!--<init-param>--
>
<
!--<param-name>targetFilterLifecycle</param-name>--
>
<
!--<param-value>true</param-value>--
>
<
!--</init-param>--
>
<
!--</filter>--
>
<
!--<filter-mapping>--
>
<
!--<filter-name>shiroFilter</filter-name>--
>
<
!--<url-pattern>/*</url-pattern>--
>
<
!--</filter-mapping>--
>
<!--<!– Shiro过滤器配置 end –>-->
<!– Shiro过滤器配置 start –>
<
filter
>
<
filter-name>shiroFilter</filter-name
>
<
filter-class
>
org.springframework.web.filter.DelegatingFilterProxy
<
/filter-class
>
<
init-param
>
<
param-name>targetFilterLifecycle</param-name
>
<
param-value>true</param-value
>
<
/init-param
>
<
/filter
>
<
filter-mapping
>
<
filter-name>shiroFilter</filter-name
>
<
url-pattern>/*</url-pattern
>
<
/filter-mapping
>
<!– Shiro过滤器配置 end –>
<
!--<session-config>--
>
<
!--<session-timeout>600</session-timeout>--
>
<
!--<
/session-config>-->
<
session-config
>
<
session-timeout>600</session-timeout
>
</session-config>-->
<!--</web-app>-->
<!-- 单点退出Listener -->
<listener>
<listener-class>
org.jasig.cas.client.session.SingleSignOutHttpSessionListener
</listener-class>
</listener>
<!-- 单点退出Filter -->
<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认证Filter -->
<filter>
<filter-name>
CASFilter
</filter-name>
<filter-class>
org.jasig.cas.client.authentication.AuthenticationFilter
</filter-class>
<init-param>
<!-- CAS登录页面,当SessionId无法匹配Session时,跳转到CAS登录页面 -->
<param-name>
casServerLoginUrl
</param-name>
<param-value>
http://localhost:8080/jeeplatform-sso/login
</param-value>
</init-param>
<init-param>
<param-name>
serverName
</param-name>
<param-value>
http://localhost:8080
</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>
CASFilter
</filter-name>
<url-pattern>
/*
</url-pattern>
</filter-mapping>
<!-- CAS Ticket校验Filter -->
<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://localhost:8080/jeeplatform-sso
</param-value>
</init-param>
<init-param>
<param-name>
serverName
</param-name>
<param-value>
http://localhost:8080
</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>
CAS Validation Filter
</filter-name>
<url-pattern>
/*
</url-pattern>
</filter-mapping>
<!-- 使客户端支持通过AssertionHolder来获取用户的登录名 -->
<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>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录