diff flys-client/src/main/java/de/intevation/flys/client/server/auth/was/Authenticator.java @ 3486:23095983c249

Implement Features handling for WAS authentication flys-client/trunk@5184 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Ricks <bjoern.ricks@intevation.de>
date Fri, 10 Aug 2012 08:17:52 +0000
parents 71ba3cf3ec5e
children 5041105d2edd
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/server/auth/was/Authenticator.java	Fri Aug 10 07:06:18 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/auth/was/Authenticator.java	Fri Aug 10 08:17:52 2012 +0000
@@ -15,17 +15,26 @@
 import de.intevation.flys.client.server.auth.AuthenticationException;
 import de.intevation.flys.client.server.features.Features;
 
-public class Authenticator implements de.intevation.flys.client.server.auth.Authenticator {
+public class Authenticator
+implements de.intevation.flys.client.server.auth.Authenticator {
 
     @Override
-    public Authentication auth(String username, String password, String encoding, Features faetures)
-        throws AuthenticationException, IOException {
+    public Authentication auth(
+        String username,
+        String password,
+        String encoding,
+        Features features
+    ) throws
+        AuthenticationException,
+        IOException
+    {
             try {
                 SSLSocketFactory sf = new SSLSocketFactory(
                         new GGInATrustStrategy());
                 Scheme https = new Scheme("https", 443, sf);
                 HttpClient httpclient = new DefaultHttpClient();
-                httpclient.getConnectionManager().getSchemeRegistry().register(https);
+                httpclient.getConnectionManager().getSchemeRegistry().register(
+                        https);
 
                 Request httpget = new Request("https://geoportal.bafg.de/" +
                         "administration/WAS", username, password, encoding);
@@ -36,7 +45,7 @@
                     return null;
                 }
                 else {
-                    return new Response(entity, username, password);
+                    return new Response(entity, username, password, features);
                 }
             }
             catch(GeneralSecurityException e) {

http://dive4elements.wald.intevation.org