powered by Jive Software

AuthProvider question

So I have written an AuthProvider implementation class (I had to grab the openfire.jar so that my IDE could work) and want to make sure that I understand how to integrate correctly. If I create a jar and put it in the lib directory, and update the openfire.xml file to use my class, I should be good to go, correct? Here is what the class looks like:

package com.myexample.openfireauth; import org.jivesoftware.openfire.auth.AuthProvider;
import org.jivesoftware.openfire.auth.InternalUnauthenticatedException;
import org.jivesoftware.openfire.auth.UnauthorizedException; public class ofAuthAdapter implements AuthProvider {     @Override
    public void authenticate(String username, String password) throws UnauthorizedException,
            InternalUnauthenticatedException{
        /*
         * Auth code here
         */
    }     @Override
    public void authenticate(String username, String token, String digest) {
        throw new UnsupportedOperationException();
    }      /*
      * The rest of the methods are here...
      */
}

Then I would just add to openfire.xml:

<provider>
     <auth>
       <className>com.myexample.openfireauth.ofAuthAdapter</className>
     </auth> </provider>

Correct? Thanks!