Junky's IT Notebook

统计

留言簿(8)

积分与排名

WebSphere Studio

阅读排行榜

评论排行榜

liferay+cas sso 配置

拷贝以下代码到liferay的web.xml文件:

<filter>
 <filter-name>CAS Required</filter-name>
 <filter-class>edu.yale.its.tp.cas.client.filter.CASFilter</filter-class>
    <init-param>
       <param-name>edu.yale.its.tp.cas.client.filter.loginUrl</param-name>
       <param-value>https://localhost:8443/cas/login</param-value>
    </init-param>
    <init-param>
       <param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name>
       <param-value>https://localhost:8443/cas/serviceValidate</param-value>
    </init-param>
    <init-param>
       <param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name>
       <param-value>localhost:8081</param-value>
    </init-param>
 </filter>

<filter-mapping>
<filter-name>CAS Required</filter-name>
<url-pattern>/c/portal/layout</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>CAS Required</filter-name>
<url-pattern>/c/portal/login</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>CAS Required</filter-name>
<url-pattern>/c/portal/group_forward</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>CAS Required</filter-name>
<url-pattern>/c/portal/remove_portlet</url-pattern>
</filter-mapping>

将以下代码拷贝到portal-ext.properties:

company.security.auth.type=userId
auto.login.hooks=com.liferay.portal.security.auth.BasicAutoLogin,com.liferay.portal.security.auth.CASAutoLogin
# disable auth pipeline (we use CAS for all this via auto.login.hooks)
auth.pipeline.pre=
auth.pipeline.enable.liferay.check=false

修改cas client的代码:edu.yale.its.tp.cas.client.Util
在函数getService中找到
if (request.getQueryString() != null)
修改为
if (request.getQueryString() != null && !"".equals(request.getQueryString().trim()))
编译,打包到liferay/WEB-INF/lib目录中。

posted on 2007-05-28 09:56 junky 阅读(1174) 评论(0)  编辑  收藏 所属分类: security


只有注册用户登录后才能发表评论。


网站导航: