Liferay+cas SSO Configuration

Source: Internet
Author: User
Tags auth cas
Copy the following code to the Web. xml file for Liferay:

<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>

Copy the following code to 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

Code to modify CAS client: Edu.yale.its.tp.cas.client.Util
Found in the function GetService
if (request.getquerystring () = null)
Revision changed to
if (request.getquerystring ()! = NULL &&! "". Equals (request.getquerystring (). Trim ()))
Compiled and packaged into the Liferay/web-inf/lib directory.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.