Hello,

I am a newbie with Zimbra. I am doing an internship in a company X. I have my Zimbra server running and everything works.

But now the company asked me to authenticate my users with their freeRADIUS2. So I started searching before posting of course and found that I have to create a custom authentication. Which I found here. So I started following what I was reading on that page. I have read the ZimbraServer/docs/extensions.txt too. But even by reading all this and searching on this forum for more information I couldn't find any that could help me in what I have to do.

I don't how to proceed to make the connection to our freeRADIUS2 server which has a MySQL database with all the users. My job is that Zimbra uses freeRADIUS2 for authenticating the users.
I started already by creating the handler for the custom authentication. But I have no clue now what I should program to make the connection with the freeRADIUS2.

I will show what I already have:

Code:
package lu.restena.zimbra;

import com.zimbra.common.util.ZimbraLog;
import com.zimbra.cs.account.Account;
import com.zimbra.cs.extension.ZimbraExtension;
import com.zimbra.cs.account.auth.ZimbraCustomAuth;
import com.zimbra.cs.extension.ExtensionException;
import com.zimbra.cs.extension.ExtensionDispatcherServlet;
import java.util.List;
import java.util.Map;

/**
 *
 * @author David Intern
 */
public class RestenaAuthenticator extends ZimbraCustomAuth implements ZimbraExtension {
   
     /**
     * @param acnt
     * @param string
     * @param map
     * @param list
     * @throws Exception 
     */
    @Override
    public void authenticate(Account acnt, String string, Map<String, Object> map, List<String> list) throws Exception {
        //ZimbraLog.account.info("user = "+acnt.getName()+", pass = "+string);
           
        // returning indicating the auth has succeeded
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
    
    
    /**
     * 
     * @return 
     */
    @Override
    public String getName() {
        return "RestenaAuthExtension";
    }

    /**
     * Initializes the extension. Called when the extension is loaded.
     * @throws ExtensionException
     * @throws com.zimbra.common.service.ServiceException
     */
    @Override
    public void init() throws ExtensionException, com.zimbra.common.service.ServiceException {     
        ZimbraCustomAuth.register("freeRadius", new RestenaAuthenticator());
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    /**
     * Terminates the extension.
     *
     */
    @Override
    public void destroy() {
        ExtensionDispatcherServlet.unregister(this);
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
}
If understand correct I have to write in:
Code:
public void init() throws ExtensionException, com.zimbra.common.service.ServiceException
The configuration of the freeRADIUS2?

Maybe someone here could help me out a bit, so that I know where I should start. Or give an example, that would be very kind. Or if this is even possible to do.
I am not familiar with all this at the moment as I am learning. If you need more information, I am gladly to give more information if needed.

Thanks in advance.