powered by Jive Software

AuthProvider custom

I created my own authprovider based on the defaultAuthProvider

Changed the provider.auth.className property to my new class and now strange things happen.

The admin console authentications calls my own authprovider.

Connecting with a Spark client my own authprovider authentication method is called

Connecting with a jabber-net client it seems that the default authentication AuthProvider is called, cant really see in the log files what is called exactly.

Should the provider.auth.className setting class not always be used for authentication or is there someone before this class that determines wether it should be used or a different provider according to maybe SASL settings?

I think you may want to look at using HybridAuthProvider instead. Take a look at

http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/javadoc/ org/jivesoftware/openfire/auth/HybridAuthProvider.html

If you happen to use a secondary DB for user auth, see also

http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/db-integ ration-guide.html

This discussion may be of use:

http://www.igniterealtime.org/community/thread/35862

I think my authprovider should work like i want it to…

The problem though is that it when certain clients login to the server it works and other times it does not.

Seems like it does not always get called, which seems pretty strange since i have no clue which class is used outside authprovider to authenticate against.

Jabber-net client login does not seem to authenticate against CustomAuthProvider

Spark client does trigger CustomAuthProvider authenticate method.

Admin login also triggers CustomAuthProvider authenticate method.

Should it not always be triggered whenever someone authenticates??

Try adding some log debug statements into your code. Also you may want to add -verbose:class to the java command line to see if it is loading the right classes.

I already have log.debug statements in every method in my own Authprovider. Simply is not called when the authentication is done via jabber-net.

Admin login and Spark client do trigger these methods so the class is loaded correctly…

Is there a point in the authentication process that can skip the AuthProvider set in the server properies or should it always be called independent on how the Authentication is called?

I’m not certain what ‘jabber-net’ is. I mentioned java -verbose:class argument because it may help you solve what it is doing when authenticating jabber-net. Restart openfire, with this option enabled, then watch the console as you authenticate jabber-net, and see what classes it is loading. This is one step short of figuring out how to run it in the jdb debugger.