<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    迷途書童

    敏感、勤學(xué)、多思
    隨筆 - 77, 文章 - 4, 評論 - 86, 引用 - 0
    數(shù)據(jù)加載中……

    Integrated cas with liferay

    借花獻(xiàn)佛:
    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
    <% String query=request.getQueryString();%>

    3) change touch_protected.jsp again. Add
    <body onLoad=”self.location=’<%= CTX_PATH%>/portal/protected?<%=query%>$mode=portal’;”>
    We will use this mode later on CAS login page

    3) Change top_bar.jsp and add

    <c:if test="<%= signedIn %>">
    <a href="<%= Http.getProtocol(request) %>://<%= request.getServerName() %>:<%=request.getServerPort()%>/html/common/logout2.jsp" class="bg" ><bean:message key="sign-out" /></a>

    </c:if>

    4) Change web.xml and add:
    <filter>
    <filter-name>CAS Filter</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://casserver:8443/cas/login</param-value>
    </init-param>
    <init-param>
    <param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name>
    <param-value>https://casserver:8443/cas/proxyValidate</param-value>
    </init-param>
    <init-param>
    <param-name>edu.yale.its.tp.cas.client.filter.logout</param-name>
    <param-value>https://casserver:8443/cas/logout</param-value>
    </init-param>
    <init-param>
    <param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name>
    <param-value>casserver</param-value>
    </init-param>
    </filter>

    <filter-mapping>
    <filter-name>CAS Filter</filter-name>
    <url-pattern>/c/portal/protected/*</url-pattern>
    </filter-mapping>

    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

    <%
    if (mode.equals("portal"))
    {
    %>
    <script language="JavaScript">
    function submitForm() {
    document.login_form.username.value ="<%=username%>";
    document.login_form.password.value ="<%=password%>";
    document.login_form.submit();
    }
    </script>

    <body onLoad="submitForm()" >
    <form method="post" name="login_form">
    <input type="hidden" name="username" maxlength="20" size="12" dir="ltr">
    <input type="hidden" name="password" maxlength="20" size="14" dir="ltr">
    <input type="hidden" name="lt" value="<%= request.getAttribute("edu.yale.its.tp.cas.lt") %>" />
    </form>

    <%
    }
    else{
    //rest of the page

    posted on 2006-05-06 15:53 迷途書童 閱讀(938) 評論(3)  編輯  收藏 所屬分類: java應(yīng)用

    評論

    # re: Integrated cas with liferay[未登錄]  回復(fù)  更多評論   

    Can you send us an email to liferaychina@gmail.com
    2008-08-14 22:52 | John

    # re: Integrated cas with liferay  回復(fù)  更多評論   

    您好,現(xiàn)在我正在將cas的登錄整合到liferay中,看到你上面的文章感覺應(yīng)該是一種解決的辦法,但是自己還是沒有弄明白,希望您能給予幫助,謝謝
    我的msn 是 hanxd106@hotmail.com
    郵箱是:172932@163.com
    2009-03-10 09:44 | 小皮球

    # re: Integrated cas with liferay  回復(fù)  更多評論   

    中國大連Liferay服務(wù)

    QQ:1417153858 (Liferay支持)
    QQ:1410151582 (Liferay培訓(xùn))
    QQ:1492270185 (Liferay企業(yè)版)

    24小時電話聯(lián)系:
    0411-84898263 (總機(jī))
    15601156692 (市場部)

    Liferay中國服務(wù)大連QQ群: 49845872
    2010-08-12 10:09 | hmf0786
    主站蜘蛛池模板: 色视频在线观看免费| 亚洲日本va一区二区三区| 精品无码国产污污污免费网站国产| 中文字幕无码免费久久99| 亚洲精品国产肉丝袜久久| 免费无码VA一区二区三区| 亚洲黑人嫩小videos| 中文字幕亚洲免费无线观看日本| 久久亚洲国产成人亚| 无码日韩精品一区二区免费暖暖| 99亚洲精品高清一二区| 国产电影午夜成年免费视频| 亚洲国产韩国一区二区| 欧美a级成人网站免费| 亚洲精品无码一区二区| 亚洲国产成人VA在线观看| 中文字幕看片在线a免费| 水蜜桃亚洲一二三四在线| 久久不见久久见免费视频7 | 亚洲乱色伦图片区小说| 热99re久久精品精品免费| 猫咪www免费人成网站| 亚洲欧洲∨国产一区二区三区| 69视频免费观看l| 亚洲色大成网站www久久九| 免费国产真实迷j在线观看| 99在线视频免费观看| 亚洲精品中文字幕无码AV| 免费无码不卡视频在线观看| 男女作爱免费网站| 亚洲AV成人一区二区三区AV| 97在线观免费视频观看 | 亚洲精品自在在线观看| 69视频在线是免费观看| 亚洲国产精品无码观看久久| 国产成人麻豆亚洲综合无码精品| 免费人成视频在线观看网站| 午夜亚洲WWW湿好爽| 亚洲av日韩av天堂影片精品| 青青久在线视频免费观看| 一级免费黄色大片|