Author: degenaro
Date: Wed Jun 12 09:20:13 2013
New Revision: 1492122

URL: http://svn.apache.org/r1492122
Log:
UIMA-2984 DUCC webserver (WS) employs wrong class for Authentication

Modified:
    
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerUserAuthentication.java

Modified: 
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerUserAuthentication.java
URL: 
http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerUserAuthentication.java?rev=1492122&r1=1492121&r2=1492122&view=diff
==============================================================================
--- 
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerUserAuthentication.java
 (original)
+++ 
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerUserAuthentication.java
 Wed Jun 12 09:20:13 2013
@@ -19,6 +19,7 @@
 package org.apache.uima.ducc.ws.server;
 
 import java.io.IOException;
+import java.util.Properties;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
@@ -48,6 +49,26 @@ public class DuccHandlerUserAuthenticati
        
        private static DuccWebSessionManager duccWebSessionManager = 
DuccWebSessionManager.getInstance();
        
+       public DuccHandlerUserAuthentication() {
+               initializeAuthenticator();
+       }
+       
+       private void initializeAuthenticator() {
+               String methodName = "initializeAuthenticator";
+               try {
+                       Properties properties = DuccWebProperties.get();
+                       String key = "ducc.authentication.implementer";
+                       if(properties.containsKey(key)) {
+                               String value = properties.getProperty(key);
+                               Class<?> authenticationImplementer = 
Class.forName(value);
+                               iAuthenticationManager = 
(IAuthenticationManager)authenticationImplementer.newInstance();
+                       }
+               }
+               catch(Exception e) {
+                       duccLogger.error(methodName, jobid, e);
+               }
+       }
+       
        protected boolean isAuthenticated(HttpServletRequest 
request,HttpServletResponse response) {
                String methodName = "isAuthenticated";
                boolean retVal = false;


Reply via email to