Mercurial > dive4elements > river
comparison 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 |
comparison
equal
deleted
inserted
replaced
2984:06d999e95615 | 2985:1f64ee424f92 |
---|---|
1 package de.intevation.flys.client.server.auth; | 1 package de.intevation.flys.client.server.auth; |
2 | 2 |
3 import java.lang.IllegalArgumentException; | 3 import org.apache.log4j.Logger; |
4 | 4 |
5 public class AuthenticationFactory { | 5 public class AuthenticationFactory { |
6 | |
7 private static final Logger log = | |
8 Logger.getLogger(AuthenticationFactory.class); | |
6 | 9 |
7 public static Authenticator getInstance(String name) | 10 public static Authenticator getInstance(String name) |
8 throws IllegalArgumentException { | 11 throws IllegalArgumentException { |
9 if (name == null | 12 if (name == null |
10 || name.equalsIgnoreCase("was") | 13 || name.equalsIgnoreCase("was") |
11 || name.equalsIgnoreCase("ggina")) { | 14 || name.equalsIgnoreCase("ggina")) { |
15 log.debug("Using GGinA authenticator."); | |
12 return | 16 return |
13 new de.intevation.flys.client.server.auth.was.Authenticator(); | 17 new de.intevation.flys.client.server.auth.was.Authenticator(); |
14 } | 18 } |
15 if (name.equalsIgnoreCase("plain")) { | 19 if (name.equalsIgnoreCase("plain")) { |
20 log.debug("Using plain authenticator."); | |
16 return | 21 return |
17 new de.intevation.flys.client.server.auth.plain.Authenticator(); | 22 new de.intevation.flys.client.server.auth.plain.Authenticator(); |
18 } | 23 } |
19 throw new IllegalArgumentException("Unkown Authentication " + name); | 24 throw new IllegalArgumentException("Unkown Authentication " + name); |
20 } | 25 } |