By: Marius Popescu user 19 Dec 2016 at 10:29 a.m. CST

2 Responses
Marius Popescu gravatar
Hi guys, We would like to use the classes from the following package(s) for some customization scripts ``` package org.gluu.site.ldap #from org.gluu.site.ldap import LDAPConnectionProvider, OperationsFacade #from org.gluu.site.ldap.persistence import LdapEntryManager ``` Please let me know what is the best way to get it installed on gluu 2.4.4 Thanks

By Michael Schwartz Account Admin 22 Dec 2016 at 3:47 p.m. CST

Michael Schwartz gravatar
Can you provide some more details on how you want to use these classes? What are you looking to do?

By Yuriy Movchan staff 23 Dec 2016 at 4:34 a.m. CST

Yuriy Movchan gravatar
Hi, It's possible to get instances of these components in next way ``` from org.jboss.seam import Component ... ldapEntryManager = Component.getInstance("ldapEntryManager") ldapAuthEntryManagerList = Component.getInstance("ldapAuthEntryManager") ``` oxAuth uses ldapEntryManager to work with internal LDAP DB. It uses ldapAuthEntryManagerList only for user authentication. It's not empty list if you specified LDAP Authentication configuaration on: https://ce-server/identity/authentication/configuration After getting LdapEntryManager you can get all required object usings next get methods: ``` ldapEntryManager.getLdapOperationService().getConnectionProvider() ``` Also you can get instance of [AuthenticationService](https://github.com/GluuFederation/oxAuth/blob/master/Server/src/main/java/org/xdi/oxauth/service/AuthenticationService.java) which useful for user authentication. There are method in this [script](https://github.com/GluuFederation/oxAuth/blob/master/Server/integrations/basic.multi_auth_conf/BasicMultiAuthConfExternalAuthenticator.py) 'createLdapExtendedEntryManagers' and 'createLdapExtendedConfigurations' which shows how to create own instance of LdapEntryManager. Regards, Yuriy