Index: core-module/pom.xml
===================================================================
diff -u -r65a85b6b3863a95c9bed6e6da7a19ae2a0906979 -r66acb7b59682010182754912d26022ecdc9cab3d
--- core-module/pom.xml (.../pom.xml) (revision 65a85b6b3863a95c9bed6e6da7a19ae2a0906979)
+++ core-module/pom.xml (.../pom.xml) (revision 66acb7b59682010182754912d26022ecdc9cab3d)
@@ -7,7 +7,7 @@
313devgrp
jstree-project
- 19.07.10
+ 19.07.11
../pom.xml
@@ -31,7 +31,7 @@
313devgrp
lib-module
- 19.07.10
+ 19.07.11
pom
Index: core-module/src/main/java/egovframework/com/ext/jstree/support/security/controller/SecurityController.java
===================================================================
diff -u -r65a85b6b3863a95c9bed6e6da7a19ae2a0906979 -r66acb7b59682010182754912d26022ecdc9cab3d
--- core-module/src/main/java/egovframework/com/ext/jstree/support/security/controller/SecurityController.java (.../SecurityController.java) (revision 65a85b6b3863a95c9bed6e6da7a19ae2a0906979)
+++ core-module/src/main/java/egovframework/com/ext/jstree/support/security/controller/SecurityController.java (.../SecurityController.java) (revision 66acb7b59682010182754912d26022ecdc9cab3d)
@@ -1,8 +1,9 @@
package egovframework.com.ext.jstree.support.security.controller;
+import com.google.gson.JsonObject;
import egovframework.com.ext.jstree.support.mvc.GenericAbstractController;
+import org.codehaus.jettison.json.JSONObject;
import org.springframework.security.web.csrf.CsrfToken;
-import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -20,10 +21,16 @@
@RequestMapping(value = {"/csrf.do"}, method = { RequestMethod.GET, RequestMethod.POST })
public ModelAndView jsTreeCSRFtoJson(ModelMap model, HttpServletRequest request) throws Exception {
+ ModelAndView modelAndView = new ModelAndView("jsonView");
+
CsrfToken token = (CsrfToken)request.getAttribute(CsrfToken.class.getName());
- ModelAndView modelAndView = new ModelAndView("jsonView");
- modelAndView.addObject("result", token.getToken());
+ JSONObject csrfJsonObj = new JSONObject();
+ csrfJsonObj.put("_csrf_token", token.getToken());
+ csrfJsonObj.put("_csrf_headerName", token.getHeaderName());
+ csrfJsonObj.put("_csrf_parameterName", token.getParameterName());
+
+ modelAndView.addObject("result", csrfJsonObj);
return modelAndView;
}
Index: lib-module/pom.xml
===================================================================
diff -u -r65a85b6b3863a95c9bed6e6da7a19ae2a0906979 -r66acb7b59682010182754912d26022ecdc9cab3d
--- lib-module/pom.xml (.../pom.xml) (revision 65a85b6b3863a95c9bed6e6da7a19ae2a0906979)
+++ lib-module/pom.xml (.../pom.xml) (revision 66acb7b59682010182754912d26022ecdc9cab3d)
@@ -5,7 +5,7 @@
313devgrp
jstree-project
- 19.07.10
+ 19.07.11
../pom.xml
Index: pom.xml
===================================================================
diff -u -r65a85b6b3863a95c9bed6e6da7a19ae2a0906979 -r66acb7b59682010182754912d26022ecdc9cab3d
--- pom.xml (.../pom.xml) (revision 65a85b6b3863a95c9bed6e6da7a19ae2a0906979)
+++ pom.xml (.../pom.xml) (revision 66acb7b59682010182754912d26022ecdc9cab3d)
@@ -10,7 +10,7 @@
4.0.0
313devgrp
jstree-project
- 19.07.10
+ 19.07.11
pom
jstree-project