From 8a70d4b43f5fa3f796bde96a8de4beb632a1a57c Mon Sep 17 00:00:00 2001
From: felmer <felmer>
Date: Tue, 15 May 2007 11:08:59 +0000
Subject: [PATCH] LMS-1 always authenticate application, otherwise a time-out
 stops authentication

SVN: 50
---
 .../authentication/crowd/CrowdAuthenticationService.java     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/authentication/source/java/ch/systemsx/cisd/authentication/crowd/CrowdAuthenticationService.java b/authentication/source/java/ch/systemsx/cisd/authentication/crowd/CrowdAuthenticationService.java
index efd55ecb26a..37362ed7e12 100644
--- a/authentication/source/java/ch/systemsx/cisd/authentication/crowd/CrowdAuthenticationService.java
+++ b/authentication/source/java/ch/systemsx/cisd/authentication/crowd/CrowdAuthenticationService.java
@@ -67,7 +67,7 @@ public class CrowdAuthenticationService implements IAuthenticationService
 
     private final String url;
     private final String application;
-    private final String applicationToken;
+    private final String applicationPassword;
 
 
     public CrowdAuthenticationService(String host, int port, String application, String applicationPassword)
@@ -79,11 +79,12 @@ public class CrowdAuthenticationService implements IAuthenticationService
     {
         this.url = url;
         this.application = application;
-        applicationToken = xmlEncode(execute("token", AUTHENTICATE_APPL, application, applicationPassword));
+        this.applicationPassword = applicationPassword;
     }
     
     public boolean authenticate(String user, String password)
     {
+        String applicationToken = xmlEncode(execute("token", AUTHENTICATE_APPL, application, applicationPassword));
         String userToken = xmlEncode(execute("out", AUTHENTICATE_USER, application, applicationToken, user, password));
         return userToken != null;
     }
-- 
GitLab