- try { \r
- logger.info("Authenticating [" + user.getProperty("name") + "]"); \r
- Pazpar2Command auth = new AuthCommand(null);\r
- auth.setParametersInState(new CommandParameter("action","=","login"), \r
- new CommandParameter("username","=",user.getProperty("name")), \r
- new CommandParameter("password","=",user.getProperty("password"))); \r
- byte[] response = send(auth);\r
- String responseStr = new String(response,"UTF-8");\r
- logger.info(responseStr); \r
- if (responseStr.contains("FAIL")) {\r
- user.credentialsAuthenticationSucceeded(false);\r
- return false;\r
- } else {\r
- user.credentialsAuthenticationSucceeded(true);\r
- return true;\r
- } \r
- } catch (ClientProtocolException e) {\r
- // TODO Auto-generated catch block\r
- e.printStackTrace();\r
- return false;\r
- } catch (IOException e) {\r
- // TODO Auto-generated catch block\r
- e.printStackTrace();\r
+ logger.info("Authenticating [" + user.getProperty("name") + "]"); \r
+ Pazpar2Command auth = new AuthCommand(null);\r
+ auth.setParametersInState(new CommandParameter("action","=","login"), \r
+ new CommandParameter("username","=",user.getProperty("name")), \r
+ new CommandParameter("password","=",user.getProperty("password"))); \r
+ ServiceProxyCommandResponse commandResponse = send(auth);\r
+ String responseStr = commandResponse.getResponseString();\r
+ logger.info(responseStr); \r
+ if (responseStr.contains("FAIL")) {\r
+ user.credentialsAuthenticationSucceeded(false);\r