Skip to content
Snippets Groups Projects
Commit 8a70d4b4 authored by felmer's avatar felmer
Browse files

LMS-1

always authenticate application, otherwise a time-out stops authentication

SVN: 50
parent 1fe65062
No related branches found
No related tags found
No related merge requests found
...@@ -67,7 +67,7 @@ public class CrowdAuthenticationService implements IAuthenticationService ...@@ -67,7 +67,7 @@ public class CrowdAuthenticationService implements IAuthenticationService
private final String url; private final String url;
private final String application; private final String application;
private final String applicationToken; private final String applicationPassword;
public CrowdAuthenticationService(String host, int port, String application, String applicationPassword) public CrowdAuthenticationService(String host, int port, String application, String applicationPassword)
...@@ -79,11 +79,12 @@ public class CrowdAuthenticationService implements IAuthenticationService ...@@ -79,11 +79,12 @@ public class CrowdAuthenticationService implements IAuthenticationService
{ {
this.url = url; this.url = url;
this.application = application; this.application = application;
applicationToken = xmlEncode(execute("token", AUTHENTICATE_APPL, application, applicationPassword)); this.applicationPassword = applicationPassword;
} }
public boolean authenticate(String user, String password) 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)); String userToken = xmlEncode(execute("out", AUTHENTICATE_USER, application, applicationToken, user, password));
return userToken != null; return userToken != null;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment