diff --git a/webgoat-container/src/main/java/org/owasp/webgoat/service/LabelDebugService.java b/webgoat-container/src/main/java/org/owasp/webgoat/service/LabelDebugService.java
index d73f7e274..c00fc20f9 100644
--- a/webgoat-container/src/main/java/org/owasp/webgoat/service/LabelDebugService.java
+++ b/webgoat-container/src/main/java/org/owasp/webgoat/service/LabelDebugService.java
@@ -29,18 +29,23 @@
*/
package org.owasp.webgoat.service;
+import java.util.HashMap;
+import java.util.Map;
+
import org.owasp.webgoat.session.LabelDebugger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
/**
- *
PluginReloadService class.
+ * LabelDebugService class.
*
* @author nbaars
* @version $Id: $Id
@@ -48,21 +53,52 @@ import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class LabelDebugService extends BaseService {
+ private static final String URL_DEBUG_LABELS_MVC = "/debug/labels.mvc";
+ private static final String KEY_ENABLED = "enabled";
+ private static final String KEY_SUCCESS = "success";
+
private static final Logger logger = LoggerFactory.getLogger(LabelDebugService.class);
@Autowired
private LabelDebugger labelDebugger;
+
/**
- * Reload all the plugins
+ * Checks if debugging of labels is enabled or disabled
*
* @return a {@link org.springframework.http.ResponseEntity} object.
*/
- @RequestMapping(value = "/debug/labels.mvc")
+ @RequestMapping(value = URL_DEBUG_LABELS_MVC, produces = MediaType.APPLICATION_JSON_VALUE)
public @ResponseBody
- //todo parse params to add enable / disable
- ResponseEntity reloadPlugins() {
- labelDebugger.enable();
- return new ResponseEntity("Label debugger enabled refresh the WebGoat page!",HttpStatus.OK);
+ ResponseEntity