(Return to Portal)
Portal Authentication

Introduction

Portal Authentication allows custom web applications to authenticate users previously authenticated by the Liferay portal. When a user logs into the Liferay portal, Liferay calls an application called the token generator. The token generator creates a token that encapsulates information for the user's session. If developers wish to add their own portlet that requires authentication from an outside web application into the Liferay portal , they can use the services depicted in the diagram below to have their outside web application authenticate users automatically.
Portal Authentication Outline
  1. When logging into Liferay, it calls the token generator, which in turn generates a token for this particular user.
  2. When a user logs into the portal, Liferay contacts a URL in your web application and appends the encoded token information to the request.
  3. Your web application calls the call-back servlet,passing the contents of the encoded token to begin user validation.
  4. The call-back servlet then passes that token information to the token generator.
  5. The token generator obtains a user profile, and sends it back to the call-back servlet.
  6. The call-back servlet then passes that user profile information, encoded as an XML string, back to your web application to the user who was authenticated.
Authentication and your Web Application

Sample Profile XML

top
Here is an example Profile XML response sent from the call-back servlet to your web application.
<?xml version="1.0" encoding="UTF-8"?>
<Profile xmlns="http://schemas.compusult.net/profile">
        <FirstName>Demo</FirstName>
        <LastName>Demo</LastName>
        <UserName>liferay.com.13</UserName>
        <EmailAddress>demo@compusult.net</EmailAddress>
        <Roles>
                <Role>dummy</Role>
        </Roles>
</Profile>
top
Links