Mercurial > dive4elements > river
comparison flys-client/src/main/java/org/dive4elements/river/client/server/auth/AuthenticationFactory.java @ 5834:f507086aa94b
Repaired internal references.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 25 Apr 2013 12:31:32 +0200 |
parents | flys-client/src/main/java/de/intevation/flys/client/server/auth/AuthenticationFactory.java@2e12518ff5b4 |
children | 821a02bbfb4e |
comparison
equal
deleted
inserted
replaced
5833:a2bdc0f524e8 | 5834:f507086aa94b |
---|---|
1 package de.intevation.flys.client.server.auth; | |
2 | |
3 import org.apache.log4j.Logger; | |
4 | |
5 public class AuthenticationFactory { | |
6 | |
7 private static final Logger log = | |
8 Logger.getLogger(AuthenticationFactory.class); | |
9 | |
10 public static Authenticator getInstance(String name) | |
11 throws IllegalArgumentException | |
12 { | |
13 if (name == null) { | |
14 throw new IllegalArgumentException("Authentication type name is null"); | |
15 } | |
16 | |
17 if (name.equalsIgnoreCase("was") || | |
18 name.equalsIgnoreCase("ggina")) { | |
19 log.debug("Using GGinA authenticator."); | |
20 return | |
21 new de.intevation.flys.client.server.auth.was.Authenticator(); | |
22 } | |
23 else if (name.equalsIgnoreCase("plain")) { | |
24 log.debug("Using plain authenticator."); | |
25 return | |
26 new de.intevation.flys.client.server.auth.plain.Authenticator(); | |
27 } | |
28 | |
29 throw new IllegalArgumentException("Unkown Authentication " + name); | |
30 } | |
31 } |