mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2025-07-29 14:00:05 +02:00
17 lines
595 B
JavaScript
17 lines
595 B
JavaScript
let ldapModule = {}
|
|
if (process.env.EXTERNAL_AUTH?.includes('ldap')) {
|
|
const { default: LDAPModuleManager } = await import('./app/src/LDAPModuleManager.mjs')
|
|
const { default: router } = await import('./app/src/LDAPRouter.mjs')
|
|
LDAPModuleManager.initSettings()
|
|
LDAPModuleManager.initPolicy()
|
|
ldapModule = {
|
|
name: 'ldap-authentication',
|
|
hooks: {
|
|
passportSetup: LDAPModuleManager.passportSetup,
|
|
getContacts: LDAPModuleManager.getContacts,
|
|
getGroupPolicyForUser: LDAPModuleManager.getGroupPolicyForUser,
|
|
},
|
|
router: router,
|
|
}
|
|
}
|
|
export default ldapModule
|