留言板

LDAP user import on AutoLogin

thumbnail
Emmanuel Guiton,修改在12 年前。

LDAP user import on AutoLogin

Junior Member 帖子: 39 加入日期: 10-12-3 最近的帖子
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,修改在12 年前。

RE: LDAP user import on AutoLogin (答复)

Liferay Legend 帖子: 1519 加入日期: 06-8-7 最近的帖子
The PortalLDAPImporterUtil class was only recently exposed to plugins so it will be available in 6.1 and 6.0 EE SP2 releases.