2

I'm new to developing for Liferay DXP and for OSGi. When we were using Liferay 6.2, we used Spring to configure com.liferay.portal.security.ldap.PortalLDAPExporterUtil to use our class that implemented com.liferay.portal.security.ldap.PortalLDAPExporter, com.liferay.portal.security.ldap.PortalLDAPImporterUtil to use our class that implemented com.liferay.portal.security.ldap.PortalLDAPExporter, and implement our own com.liferay.portal.security.auth.Authenticator. Now that we're using Liferay DXP, I've been able to change one of the services a module's component uses, but what do I do if I want to change the service a component provides? I notice that com.liferay.portal.security.ldap.internal.authenticator.LDAPAuth, com.liferay.portal.security.ldap.internal.exportimport.LDAPUserExporterImpl, and com.liferay.portal.security.ldap.internal.exportimport.LDAPUserImporterImpl are all components of the LDAP application's "Liferay Portal Security LDAP" module. I want to make sure my version of these things are used, instead of the LDAP's version. Is it possible to replace a module's component or the implementation of the service that component provides? Or do I need to replace the entire LDAP application with my own version?

Sechanris
  • 232
  • 1
  • 9
  • You can override Liferay modules with a custom bundle having a higher service.ranking Maybe this [Message Post](You can override Liferay modules with a custom bundle having a higher service.ranking Maybe this [Message Post](https://web.liferay.com/de/community/forums/-/message_boards/message/86984832) helps – Andre Albert Jan 21 '18 at 10:06
  • That can be the case with some services, but in the case of the authentication process, Liferay gets all available com.liferay.portal.security.auth.Authenticator services and uses each of them. In order to make sure ours was used and Liferay's wasn't, we ended up replacing the Liferay LDAP module. – Sechanris Jan 24 '18 at 23:09

0 Answers0