Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/auth/AuthenticationFactory.java @ 2959:5ba0a6efdf3b
Auth: added simple file based authentication.
flys-client/trunk@4939 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 11 Jul 2012 14:53:33 +0000 |
parents | d7f76f197d89 |
children | 1f64ee424f92 |
comparison
equal
deleted
inserted
replaced
2958:973d4a968f6a | 2959:5ba0a6efdf3b |
---|---|
4 | 4 |
5 public class AuthenticationFactory { | 5 public class AuthenticationFactory { |
6 | 6 |
7 public static Authenticator getInstance(String name) | 7 public static Authenticator getInstance(String name) |
8 throws IllegalArgumentException { | 8 throws IllegalArgumentException { |
9 if (name == null || name.equalsIgnoreCase("was") || | 9 if (name == null |
10 name.equalsIgnoreCase("ggina")) { | 10 || name.equalsIgnoreCase("was") |
11 return new de.intevation.flys.client.server.auth.was.Authenticator(); | 11 || name.equalsIgnoreCase("ggina")) { |
12 return | |
13 new de.intevation.flys.client.server.auth.was.Authenticator(); | |
14 } | |
15 if (name.equalsIgnoreCase("plain")) { | |
16 return | |
17 new de.intevation.flys.client.server.auth.plain.Authenticator(); | |
12 } | 18 } |
13 throw new IllegalArgumentException("Unkown Authentication " + name); | 19 throw new IllegalArgumentException("Unkown Authentication " + name); |
14 } | 20 } |
15 } | 21 } |