dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24884
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12244: Added simple endpoint for checking if request is authenticated
------------------------------------------------------------
revno: 12244
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-09-25 17:08:16 +0200
message:
Added simple endpoint for checking if request is authenticated
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SystemController.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SystemController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SystemController.java 2013-09-03 18:28:38 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SystemController.java 2013-09-25 15:08:16 +0000
@@ -49,10 +49,12 @@
import org.hisp.dhis.user.CurrentUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
/**
* @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
@@ -158,4 +160,10 @@
JacksonUtils.toJson( response.getOutputStream(), info );
}
+
+ @RequestMapping( value = "/ping", method = RequestMethod.GET, produces = "text/plain" )
+ public @ResponseBody String ping( Model model )
+ {
+ return "pong";
+ }
}