Is there a way to hack ejabberd to use the full jid of the user as a key/username for odbc authentication and storage?
I have my server with one table for all users across all domains, etc. I can replace ejabberd's users table with a view into my auth table, however it seems that ejabberd is dropping the domain part when it does it's authentication sql queries. It also seems that in storing various bits of data in odbc, the "user" key lacks the domain part of the jid. Is there a switch or option that I can set that would make all queries use the full jid for the username? If not, is there a specific function/method/whatever that is used to get the username that I can "hack" so that it returns the full jid instead of just the user part? Would this be an easy thing to do, or even advisable?
The rationale is that without this, I'll have to create individual user views and ejabberd databases for each virtual host I wish to define. Anyone setting up virtual hosting with SQL and wants to have seperate joe@example1 and joe@example2 users would have the same issue. If the username was specified as the full JID of the user instead of just the user part, then virtual hosting on odbc could be very simple. This would be a good feature to have and (I'd think) an easy option to implement.
extauth passes username and
extauth passes username and domain, I use a perl script to do some other logic based on user and host to determine authorization.
Not possible, seems to require several changes in code
Is there a switch or option that I can set that would make all queries use the full jid for the username?
Doesn't seem so. Check this thread:to store whole JID on users table