Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter 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
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
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

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 a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

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
€18.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
€189.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
€264.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 120.97
Liferay 6.x Portal Enterprise Intranets Cookbook
€41.99
Liferay Portal 6.x Enterprise Intranets (Update)
€49.99
Liferay Portal Performance Best Practices
€28.99
Total 120.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 included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.