Forums de discussion

LDAP user import on AutoLogin

thumbnail
Emmanuel Guiton, modifié il y a 12 années.

LDAP user import on AutoLogin

Junior Member Publications: 39 Date d'inscription: 03/12/10 Publications récentes
Hello All,

I am looking for a way to import a user from an LDAP directory in an autologin hook.

We have setup a Liferay portal behind a reverse proxy.
Users authenticate with the reverse proxy using an X509v3 certificate.
When sending the HTTP request to Liferay, the reverse proxy sets a custom HTTP request header field with a value from the certificate.
In the AutoLogin hook, we fetch the header field value, identify the user to which the certificate belong, get her/his e-mail address.
At this point, when the user is not already recorded in Liferay, we want to import her/him from an LDAP directory.

I tried to use the com.liferay.portal.security.ldap.PortalLDAPImporterUtil class.
But I have a ClassNotFoundError when I deploy the hook. From what I understood, this is because the hook has no access to this class in its own execution context.
How can I circumvent this problem ?
I tried looking for a service class such as OrganizationLocalServiceUtil but it seems that none exist to perform LDAP imports.

Thanks for any help,
- emmanuel
thumbnail
Mika Koivisto, modifié il y a 12 années.

RE: LDAP user import on AutoLogin (Réponse)

Liferay Legend Publications: 1519 Date d'inscription: 07/08/06 Publications récentes
The PortalLDAPImporterUtil class was only recently exposed to plugins so it will be available in 6.1 and 6.0 EE SP2 releases.