Enables the Sign In portlet to process an OpenID login attempt. When invoked,
the following steps are carried out.
-
Discover the OpenID provider's XRDS document by performing HTTP GET on
the user's OpenID URL. This document tells Liferay what the URL of the OpenID
provider is.
-
Retrieve the OpenID provider's authentication URL which is provided by
the XRDS document and prepare an OpenID authorization request URL. This URL
includes a return URL parameter (encoded) which points back to this
MVCActionRequest with an additional parameter
cmd = read
(used
in step 7).
-
Search for an existing Liferay Portal user with the user provided OpenID.
-
If found, redirect the browser to the OpenID authentication request URL
and wait for the browser to be redirected back to Liferay Portal when all
steps repeat. Otherwise, ...
-
Generate a valid Liferay Portal user screen name based on the OpenID
and search for an existing Liferay Portal user with a matching screen name.
If found, then update the Liferay Portal user’s OpenID to match and redirect
the browser to the OpenID authentication request URL. Otherwise, ...
-
Enrich the OpenID authentication request URL with a request for specific
attributes (the user's
fullname
and email
). Then
redirect the browser to the enriched OpenID authentication request URL.
-
Upon returning from the OpenID provider’s authentication process, the
MVCActionCommand finds the URL parameter
cmd
set to
read
(see step 2).
-
The request is verified as being from the same OpenID provider.
-
If the attributes requested in step 6 are not found, then the web browser
is redirected to the Create Account page where the missing information must
be entered before a Liferay Portal user can be created. Otherwise, ...
-
The attributes are used to create a Liferay Portal user and the HTTP
session attribute
OPEN_ID_LOGIN
is set equal to the Liferay
Portal user's ID.