Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Liferay 6.x Portal Enterprise Intranets Cookbook
Liferay 6.x Portal Enterprise Intranets Cookbook

Liferay 6.x Portal Enterprise Intranets Cookbook: Over 60 hands-on recipes to help you efficiently create complex and highly personalized enterprise intranet solutions with Liferay Portal 6.x CE

eBook
$9.99 $43.99
Paperback
$54.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Liferay 6.x Portal Enterprise Intranets Cookbook

Chapter 2. Authentication and Registration Process

In this chapter, we will cover the following topics:

  • Changing the default authentication settings
  • Setting up e-mail notifications
  • Customizing the registration form
  • Overriding the default login page with the administrator-defined page
  • Setting up a password policy
  • Integration with CAS SSO
  • CAS and Liferay users' database
  • Liferay and the LDAP integration
  • The magic trio: Liferay, CAS, and LDAP

Introduction

The authentication and registration processes are very important to build intranet systems. In this type of software, it is necessary to protect data against non-authorized users. We decided to describe typical solutions that are commonly used in many projects. It will help you configure the out-of-the box authentication system in Liferay and define the password policy. You will also learn about integration with the most popular single sign-on mechanism (SSO). The purpose of an SSO is to permit a user to access multiple applications while providing their credentials only once. The Central Authentication Service (CAS) is a single sign-on protocol for the Web. It is also a software package that implements this protocol.

Changing the default authentication settings

Liferay provides a built-in authentication mechanism that, by default, allows users to log in using their e-mail address. Additionally, there are a number of functionalities, such as automatic log in or forgotten password functionality, that assist users and help them go through the authentication process. However, in some cases, the standard authentication behavior must be modified.

Getting ready

Log in to Liferay as a user with administrator credentials. By default, the credentials are as follows:

  • E-mail: test@liferay.com
  • Password: test

How to do it…

In order to change the default authentication settings, perform the following steps:

  1. Log in as an administrator and go to Admin | Control Panel | Configuration | Portal Settings | Authentication section:
    How to do it…
  2. Make sure that you are in the General tab.
  3. Choose the option that you prefer from the Authentication type drop-down list.
  4. Enable/disable the Allow users to automatically login? option.
  5. Enable/disable...

Setting up e-mail notifications

In Liferay, there are four automatically sent e-mail notifications. They are as follows:

  • Account Created Notification, which is sent when a user successfully creates a new account
  • Email Verification Notification, which provides the e-mail verification link and code
  • Password Changed Notification, which informs a user that their password has been changed
  • Password Reset Notification, which enables a user to reset their current password by providing the password reset URL

This recipe provides information on how these default notifications can be customized.

Getting ready

Make sure that the Java mail session is properly configured. To check whether it works, look at portal-ext.properties and find and/or configure the following settings:

mail.session.mail.pop3.host=localhost
mail.session.mail.pop3.password=
mail.session.mail.pop3.port=110
mail.session.mail.pop3.user=
mail.session.mail.smtp.auth=false
mail.session.mail.smtp.host=localhost
mail.session.mail.smtp.password...

Customizing the registration form

The content of the registration form and the behavior of the system after completing the registration process can vary, depending on the system's functional and non-functional requirements. The default configuration of the registration form enables you to gather the data strictly required to create an account. The configuration also provides some additional fields, such as birth date or gender, which may not be always desirable. This recipe describes how to change the default set of registration form fields and modify their basic preferences and system behavior within the registration and authorization processes.

How to do it…

In order to customize the registration form, perform these steps:

  1. Login as an administrator and go to Admin | Control Panel | Configuration | Portal settings | Users:
    How to do it…
  2. Make sure that you are in the Fields tab.
  3. Enable/disable the Terms of Use Required option.
  4. Enable/disable the Autogenerate User Screen Names option.
  5. Enable/disable...

Overriding the default login page with the administrator defined page

Liferay provides the possibility to use or replace the default dialog login feature with a custom login page. The custom page can be used to present some additional information such as instructions, description of benefits, and so on. This recipe provides guidelines on how to set such a page within the intranet.

How to do it…

In order to set a custom page in the login process, follow these steps:

  1. Log in as an administrator and go to Admin | Site Administration | Pages.
  2. Make sure that you are in the Public Pages tab.
  3. Click on the Add page button.
  4. Provide a name for the page (for instance, login).
  5. Enable the Hide from Navigation Menu option.
  6. Click on the Add page button. The new page will be created.
  7. Go to the page's details by clicking on the page in the tree that was created and copy the Friendly URL value.
  8. Go to the created page by typing (or pasting) its address in the browser's address bar.
  9. Click on the add button...

Setting up a password policy

The Liferay password policy creator allows you to set the password life cycle and rules of employing it. You can decide whether the password should be changed. You can also specify the password syntax, the expiration rules, the lockout options, and the password history.

The default password policy provided by Liferay is very simple. It enables you to change the password of users and specifies that the reset password link should be valid for one day. This recipe provides a detailed description on how to create a new, more restricted password policy.

The password policy in this example will require the users to provide eight-character passwords, which cannot be found in a dictionary. Users must include numbers and uppercase letters in the password, and it must be changed every sixty days (it should not be possible to set the password that has been used last ten times). Additionally, the system will count the failure login attempts and block the account for 10 minutes...

Introduction


The authentication and registration processes are very important to build intranet systems. In this type of software, it is necessary to protect data against non-authorized users. We decided to describe typical solutions that are commonly used in many projects. It will help you configure the out-of-the box authentication system in Liferay and define the password policy. You will also learn about integration with the most popular single sign-on mechanism (SSO). The purpose of an SSO is to permit a user to access multiple applications while providing their credentials only once. The Central Authentication Service (CAS) is a single sign-on protocol for the Web. It is also a software package that implements this protocol.

Changing the default authentication settings


Liferay provides a built-in authentication mechanism that, by default, allows users to log in using their e-mail address. Additionally, there are a number of functionalities, such as automatic log in or forgotten password functionality, that assist users and help them go through the authentication process. However, in some cases, the standard authentication behavior must be modified.

Getting ready

Log in to Liferay as a user with administrator credentials. By default, the credentials are as follows:

  • E-mail: test@liferay.com

  • Password: test

How to do it…

In order to change the default authentication settings, perform the following steps:

  1. Log in as an administrator and go to Admin | Control Panel | Configuration | Portal Settings | Authentication section:

  2. Make sure that you are in the General tab.

  3. Choose the option that you prefer from the Authentication type drop-down list.

  4. Enable/disable the Allow users to automatically login? option.

  5. Enable/disable the...

Setting up e-mail notifications


In Liferay, there are four automatically sent e-mail notifications. They are as follows:

  • Account Created Notification, which is sent when a user successfully creates a new account

  • Email Verification Notification, which provides the e-mail verification link and code

  • Password Changed Notification, which informs a user that their password has been changed

  • Password Reset Notification, which enables a user to reset their current password by providing the password reset URL

This recipe provides information on how these default notifications can be customized.

Getting ready

Make sure that the Java mail session is properly configured. To check whether it works, look at portal-ext.properties and find and/or configure the following settings:

mail.session.mail.pop3.host=localhost
mail.session.mail.pop3.password=
mail.session.mail.pop3.port=110
mail.session.mail.pop3.user=
mail.session.mail.smtp.auth=false
mail.session.mail.smtp.host=localhost
mail.session.mail.smtp.password...

Customizing the registration form


The content of the registration form and the behavior of the system after completing the registration process can vary, depending on the system's functional and non-functional requirements. The default configuration of the registration form enables you to gather the data strictly required to create an account. The configuration also provides some additional fields, such as birth date or gender, which may not be always desirable. This recipe describes how to change the default set of registration form fields and modify their basic preferences and system behavior within the registration and authorization processes.

How to do it…

In order to customize the registration form, perform these steps:

  1. Login as an administrator and go to Admin | Control Panel | Configuration | Portal settings | Users:

  2. Make sure that you are in the Fields tab.

  3. Enable/disable the Terms of Use Required option.

  4. Enable/disable the Autogenerate User Screen Names option.

  5. Enable/disable the Last...

Left arrow icon Right arrow icon

Description

If you are a Java developer or administrator with a technical background and want to install and configure Liferay Portal as an enterprise intranet, this is the book for you. In short, reusable recipes help you realize business goals as working features in Liferay. This book will also give you useful hints on how to easily improve the default functionality of the system and its performance.

Who is this book for?

If you are a Java developer or administrator with a technical background and want to install and configure Liferay Portal as an enterprise intranet, this is the book for you. In short, reusable recipes help you realize business goals as working features in Liferay. This book will also give you useful hints on how to easily improve the default functionality of the system and its performance.

What you will learn

  • Build a corporate knowledge base for all employees in your organization
  • Configure site and page templates for departments in your company
  • Design and implement roles and permissions to fit your organization
  • Define efficient business processes using XML representation
  • Integrate with LDAP, CAS SSO, and Solr search engine
  • Improve your portal with caching, clustering, indexing, searching, and more
  • Use effective taxonomy and folksonomy to organize documents and articles
Estimated delivery fee Deliver to Egypt

Standard delivery 10 - 13 business days

$12.95

Premium delivery 3 - 6 business days

$34.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : May 30, 2015
Length: 300 pages
Edition : 1st
Language : English
ISBN-13 : 9781782164289
Vendor :
Liferay Inc.
Category :
Languages :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Egypt

Standard delivery 10 - 13 business days

$12.95

Premium delivery 3 - 6 business days

$34.95
(Includes tracking information)

Product Details

Publication date : May 30, 2015
Length: 300 pages
Edition : 1st
Language : English
ISBN-13 : 9781782164289
Vendor :
Liferay Inc.
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 159.97
Liferay Portal Performance Best Practices
$38.99
Liferay Portal 6.x Enterprise Intranets (Update)
$65.99
Liferay 6.x Portal Enterprise Intranets Cookbook
$54.99
Total $ 159.97 Stars icon
Banner background image

Table of Contents

13 Chapters
1. Installation and Basic Configuration Chevron down icon Chevron up icon
2. Authentication and Registration Process Chevron down icon Chevron up icon
3. Working with a Liferay User / User Group / Organization Chevron down icon Chevron up icon
4. Liferay Site Configuration Chevron down icon Chevron up icon
5. Roles and Permissions Chevron down icon Chevron up icon
6. Documents and Media in Liferay Chevron down icon Chevron up icon
7. Working with Content Chevron down icon Chevron up icon
8. Search and Content Presentation Tools Chevron down icon Chevron up icon
9. Liferay Workflow Capability Chevron down icon Chevron up icon
10. Collaboration Tools Chevron down icon Chevron up icon
11. Quick Tricks and Advanced Knowledge Chevron down icon Chevron up icon
12. Basic Performance Tuning Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.8
(4 Ratings)
5 star 75%
4 star 25%
3 star 0%
2 star 0%
1 star 0%
Jens J Jul 03, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I’m new to Liferay and so I bought this book to get basic and detailed information about this system. I had the goal that after reading this book I will have the knowledge for configuration and administration Liferay.In the first chapters the book describes the topics from the installation to the first Liferay site. It’s really well explained and easy to understand. For me it was easy to do my first Liferay installation. Beside this information I was looking for more knowledge about integrating LDAP. In this book the chapter for authentication and registration has in sum 36 pages. The authors gives step by step instructions and “How it works information”. As a user you can do the configuration and know how it works or what happens in the background. For me it was really informative to go through this chapter.When you a working with Liferay for the first time and you plan to configure the first user you will be in contact with the “user”, “user group” and “organization” structure. For me it was new and I had no idea how they work together or how they are interdependent. But in this book there are good examples to understand how to use these functions in a business environment and find a structure for your own company with the necessary roles and rules.In the following chapters the book covers topics like configuring a new site, creating templates, document management and integration workflows. I like to point out the topics live staging and integrating search functionality. For me both are really interesting and helpful for using Liferay as a portal user.If you are using a system like Liferay you will come to a point where you aren’t satisfied with the system performance. This book has an own chapter for “Basic Performance Tuning”. For me it was interesting to go through it. Beside scalability aspects you will find solutions for typical problems like JVM Garbage collection settings to avoid out of memory exceptions.In sum I really enjoyed reading this book. On one hand I had step by step examples to setup and use Liferay and on the other hand I received really informative background information. All in all I can recommend this book to users who are new or still have knowledge in Liferay.
Amazon Verified review Amazon
Pierpaolo Sep 09, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Firstly it's necessary to observe that something like an encyclopedia should be necessary to properly deal the topic "Liferay Portal". Of course resources around the web are generally useful to solve daily problems but, to be honest, Liferay team needs for further effort (because finding dated or non perfect information is really common).In my mind this book is the right tool for people searching for quick and useful information, without losing the possibility to go in depth on important topics, if necessary.In fact, as any cookbook, it doesn't deal with heavy theoretical aspects, but it goes directly to the point by its great number of recipes. On the other hand, it is very common to find an "how it works" paragraph beside a recipe; it analyses important aspects of the previous recipe(s) steps. In other words: a practice to not-mandatory-theory approach.Obviously not all the topic over Liferay are dealt with, but the book is full of recipes for users, developers, systems experts, etc.To provide several example, it writes of any CMS tool (e.g. collaboration), of users, groups, permissions and documents management, of setup and tuning for production environments, of workflow capabilities, etc...
Amazon Verified review Amazon
Vinay Jul 31, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I love this book..Will recommend it to everyonw
Amazon Verified review Amazon
SANTHOSH G May 15, 2016
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Good for beginners
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela