免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1043 | 回复: 0
打印 上一主题 下一主题

Integrated cas with liferay [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-03-02 00:47 |只看该作者 |倒序浏览
借花献佛:
We found some way that somehow, solves the liferay integration with cas. The solution is this when you login in to liferay just in the try to call the login page of cas manually
1) Change the view.jsp page. make the form method to get
2) change touch_protected.jsp. Add

3) change touch_protected.jsp again. Add
/portal/protected?$mode=portal’;”>
We will use this mode later on CAS login page
3) Change top_bar.jsp and add
">
://:/html/common/logout2.jsp" class="bg" >
4) Change web.xml and add:
CAS Filter
edu.yale.its.tp.cas.client.filter.CASFilter
edu.yale.its.tp.cas.client.filter.loginUrl
https://casserver:8443/cas/login
edu.yale.its.tp.cas.client.filter.validateUrl
https://casserver:8443/cas/proxyValidate
edu.yale.its.tp.cas.client.filter.logout
https://casserver:8443/cas/logout
edu.yale.its.tp.cas.client.filter.serverName
casserver
CAS Filter
/c/portal/protected/*
6) We should define a logout2.jsp which calls the cas logout url not liferay logout.
NOW WE SHOULD GO TO CAS-SERVER. We should use the mode paramater here to do some tricks. Remmeber there are other applications that want to use the normal login page, only we(liferay users) need to make a hidden view of this page.
5) change the the login.jsp and header.jsp. You must configure the CAS login page to view itself in while it login page is loaded in liferay. just add this on the header.jsp
String mode="standard";
String username="";
String password="";
String url = request.getParameter("service");
if (!url.equals(null)){
int pos=url.lastIndexOf('?');
int pos1=url.indexOf("mode=portal",pos);
if (pos1!=-1)
{
mode="portal";
}
now use the mode parameter to create a login form which all hidden filed
function submitForm() {
document.login_form.username.value ="";
document.login_form.password.value ="";
document.login_form.submit();
}
" />


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/13101/showart_79966.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP