powered by Jive Software

Creating a custom AuthProvider

I’'m writing a custom AuthProvider, and I have a couple of questions:

  1. Is there any way to prevent the admin from using the custom AuthProvider? I only want XMPP clients to use my AuthProvider, and I’'d like the admin to use its default authentication.

  2. Is there a way for my AuthProvider to get access to bootstrap properties defined in wildfire.xml? I can use JiveProperties, but it does not seem to contain properties from the XML file, and I can use JiveGlobals, but it looks like I have to create a new instance of it which isn’‘t ideal since I’'m sure there is already an instance available with all the data I need in it.

Thanks,

Christian

Hi Christian,

  1. Is there any way to prevent the admin from using

the custom AuthProvider? I only want XMPP clients to

use my AuthProvider, and I’'d like the admin to use

its default authentication.

A good option might be to use the HybridAuthProvider. This allows chaining of providers with overrides for specific users. Refer to the java doc for more details.

  1. Is there a way for my AuthProvider to get access

to bootstrap properties defined in wildfire.xml? I

can use JiveProperties, but it does not seem to

contain properties from the XML file, and I can use

JiveGlobals, but it looks like I have to create a new

instance of it which isn’‘t ideal since I’'m sure there

is already an instance available with all the data I

need in it.

All the methods of JiveGlobals are static so you don’'t have to create an instance of it. The getXml type methods are probably the ones you need to use, as these read from the xml file.

Hope that helps,

Conor

Thanks,

Christian