view flys-client/src/main/java/de/intevation/flys/client/server/auth/AuthenticationFactory.java @ 2985:1f64ee424f92

Corrected broken web.xml flys-client/trunk@4996 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 13 Jul 2012 13:51:58 +0000
parents 5ba0a6efdf3b
children a050cb5f303f
line wrap: on
line source
package de.intevation.flys.client.server.auth;

import org.apache.log4j.Logger;

public class AuthenticationFactory {

    private static final Logger log =
        Logger.getLogger(AuthenticationFactory.class);

    public static Authenticator getInstance(String name)
        throws IllegalArgumentException {
        if (name == null
        || name.equalsIgnoreCase("was")
        || name.equalsIgnoreCase("ggina")) {
            log.debug("Using GGinA authenticator.");
            return
                new de.intevation.flys.client.server.auth.was.Authenticator();
        }
        if (name.equalsIgnoreCase("plain")) {
            log.debug("Using plain authenticator.");
            return
                new de.intevation.flys.client.server.auth.plain.Authenticator();
        }
        throw new IllegalArgumentException("Unkown Authentication " + name);
    }
}

http://dive4elements.wald.intevation.org