Just installed openfire today, and been trying to get any of the auth plugins but mainly the pop3 plugin. After playing around for hours, I got eclipse attached / debugging and could see authenticate(String username, String password) was being passed strictly username, not username@domain.com. I’m not a Java developer so I’m not exactly sure what could be causing this, since it appears each auth provider checks for “@” being present (Default, Pop3, JDBC).
Anyone have any ideas, hit a big road block with this, I’d assume this isn’t a bug, but a mis-configuration, but I’ve tried tweaking things and gotten no where fast.
Any pointers would be a great help, trying to watch one of the plugins in full action so I can write my own to connect to the CMS provider I’m presently using.
Openfire does only support a single XMPP domain. The auth providers just strip the domainpart (which should be done one layer higher, there is no need that every auth provider does this, but that’s a design issue).
That’s a nice example of a dangling else. Where is the snippet from? I can not tell to which if condition this is the else case. The two providers I’ve taken a quick look at DefaultAuthprovider and LdapAuthProvider don’t throw an UnothorizedException if the username does not contain a ‘@’ character.
The logic is more or less flawed. I don’t think it makes sense to throw an UnauthorizedException in case the username does not contain an ‘@’ character.