没有合适的资源?快使用搜索试试~ 我知道了~
让CAS支持客户端自定义登陆页面----服务器篇--.doc
0 下载量 117 浏览量
2024-06-29
17:27:07
上传
评论
收藏 43KB DOC 举报
温馨提示
![preview](https://dl-preview.csdnimg.cn/89496726/0001-221e8b6863abf39606892b00a25258d6_thumbnail-wide.jpeg)
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
试读
12页
服务器
资源推荐
资源详情
资源评论
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/msword](https://img-home.csdnimg.cn/images/20210720083327.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![exe](https://img-home.csdnimg.cn/images/20210720083343.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/release/download_crawler_static/89496726/bg1.jpg)
� 让 CAS 支持客户端自定义登陆页面——效劳器篇 - [De
velopment]
2009-03-23
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
上篇?让 CAS 支持客户端自定义登陆页面——原理篇?讲述了一些修改的理论根底,这篇讲解如何对 CA
S 效劳器端进行修改。
修改需要基于几个根本原那么:
1. 不影响原有统一登陆界面功能
2. 客户端应尽量保持简单
3. 尽量保证原有功能的完整性和平安性
对于第三点,必须事先说明:将登陆页面放到客户端本身就是降低了 CAS 平安性,这意味着作为效劳向
外发布的 CAS 效劳器中的用户密码有可能由于客户端的不平安性而导致泄露,整个 CAS 系统成为了一
个“水桶形态〞,整个 CAS 体系的平安性将取决于所有客户端中平安性最低的一个。这也是 CAS 官方一
直不推荐的方式。
接下来我们讲解效劳器端修改的详细过程:
首先,修改/WEB-INF/web.xml,为 cas 增加一个/remoteLogin 的映射:
<servlet-mapping>
<servlet-name>cas</servlet-name>
<url-pattern>/remoteLogin</url-pattern>
</servlet-mapping>
![](https://csdnimg.cn/release/download_crawler_static/89496726/bg2.jpg)
然后修改 cas-servlet.xml 文件,增加我们对/remoteLogin 映射的处理,需要增加一个新流程:
<bean id="handlerMappingB" class="org.springframework.web.servlet.handler.SimpleUrlHand
lerMapping">
<property name="mappings">
<props>
<prop key="/login">loginController</prop>
<prop key="/remoteLogin">remoteController</prop>
</props>
</property>
<property name="interceptors">
<list>
<ref bean="localeChangeInterceptor" />
</list>
</property>
</bean>
然后在 cas-servlet.xml 文件中添加我们上面所配置的 remoteController 的 bean:
<!-- 增加远程控制者,允许以/remote 请求启动 remote 控制流程 -->
<bean id="remoteLoginController"
class="org.springframework.webflow.executor.mvc.FlowController"
p:flowExecutor-ref="remoteLoginFlowExecutor"
p:defaultFlowId="remoteLogin-webflow">
<property name="argumentHandler">
<bean
class="org.springframework.webflow.executor.support.RequestParameterFlowExecutorArgum
entHandler"
![](https://csdnimg.cn/release/download_crawler_static/89496726/bg3.jpg)
p:flowExecutionKeyArgumentName="lt"
p:defaultFlowId="remoteLogin-webflow" />
</property>
</bean>
<flow:executor id="remoteLoginFlowExecutor" registry-ref="remoteLoginFlowRegistry">
<flow:execution-attributes>
<flow:alwaysRedirectOnPause value="false"/>
</flow:execution-attributes>
</flow:executor>
<flow:registry id="remoteLoginFlowRegistry">
<flow:location path=""/>
</flow:registry>
可以看到上面将请求指向了 webflow 配置文件/WEB-INF/remoteLogin-webflow.xml 文件,我们需
要创立此文件并配置其成为我们所需的流程,以下是 remoteLogin-webflow.xml 全文:
<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns=""
xmlns:xsi=""
xsi:schemaLocation="
">
<start-state idref="remoteLogin"/>
<!-- 远程登陆主要 Action -->
<action-state id="remoteLogin">
<action bean="remoteLoginAction" />
<transition on="error" to="remoteCallbackView" />
剩余11页未读,继续阅读
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/cb6aa90a299b4c48b5485fc622c9643a_weixin_43990727.jpg!1)
学习使人快乐张
- 粉丝: 68
- 资源: 6万+
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)