Is there a way to call a method before LDAP authentication?

Hi, I need to execute a method before authentication via LDAP, I would like to know if Jitsi provides a way to do this, I didn’t find anything similar in the documentation.

thanks

Not out of the box. What is your usecase?

Hello thanks for the reply, have a Jitsi server where the configuration is for example:
ldap = {
hostname = ‘main.domain.com’,
bind_dn = ‘cn=admin,dc=example,dc=com’,
bind_password = ‘s3cr37’,
use_tls = true,
user = {
usernamefield = ‘uid’,
basedn = ‘ou=people,dc=example,dc=com’,
filter = ‘(objectClass=*)’,
– admin?
–namefield = ‘cn’,
},
}

So whenever I send a request for authentication, I must send a user and the domain is auto-completed with @main.domain.com, but in my LDAP users log in with different domains, so if a person with the user user1@domain2.com try to login is not possible due to @domain2, so I would like to intercept the request to somehow remove @domain, i searched but didn’t find a way to login LDAP with multiple domains.

Using JWT is not an option at the moment.

I’m afraid that’d not possible. Not sure if what you need is attainable with the builtin LDAP auth plugin in Prosody, but I’d start looking there.

1 Like