Multi Domain patch


I am coding a patch to Openfire 3.6.3 to allow it to work with multiples domains, let me explaing what I want:

I want to have one single administration interface and be able to add and, I want

userA to login as and userB to login as I want to be able to have the same username

in both domains so is different from

I was able autenticate the user as but I am having some problem with XMPPCallbackHandler when it is

been called with the AuthorizeCallback instance, at that point I only receive the user part “user” from and when

it calls my MultiDomainUserProvider.loadUser it only pass the user part so it is not able to find the and I end up with an anonymous user connected.

I anyone could point me if this is correct or what direction should I follow that would be great.