diff --git a/java/com.sap.sailing.server/SailingServer (No Proxy, Jetty on 8889).launch b/java/com.sap.sailing.server/SailingServer (No Proxy, Jetty on 8889).launch
index 3ec0f77dfc2..69a5e66fe14 100755
--- a/java/com.sap.sailing.server/SailingServer (No Proxy, Jetty on 8889).launch
+++ b/java/com.sap.sailing.server/SailingServer (No Proxy, Jetty on 8889).launch
@@ -23,7 +23,7 @@
-
+
diff --git a/java/com.sap.sailing.server/SailingServer (No Proxy, Jetty on 8889, Cached MTB).launch b/java/com.sap.sailing.server/SailingServer (No Proxy, Jetty on 8889, Cached MTB).launch
index 7dc838a1181..68c47acb5b8 100755
--- a/java/com.sap.sailing.server/SailingServer (No Proxy, Jetty on 8889, Cached MTB).launch
+++ b/java/com.sap.sailing.server/SailingServer (No Proxy, Jetty on 8889, Cached MTB).launch
@@ -16,14 +16,14 @@
-
+
-
+
diff --git a/java/com.sap.sailing.server/SailingServer (No Proxy, Jetty on 8890).launch b/java/com.sap.sailing.server/SailingServer (No Proxy, Jetty on 8890).launch
index 4e7742996a4..877c62f65a7 100755
--- a/java/com.sap.sailing.server/SailingServer (No Proxy, Jetty on 8890).launch
+++ b/java/com.sap.sailing.server/SailingServer (No Proxy, Jetty on 8890).launch
@@ -22,7 +22,7 @@
-
+
diff --git a/java/com.sap.sailing.server/SailingServer (No Proxy, Remote Debug SAP VM).launch b/java/com.sap.sailing.server/SailingServer (No Proxy, Remote Debug SAP VM).launch
index a0b813374ec..04690b503fa 100755
--- a/java/com.sap.sailing.server/SailingServer (No Proxy, Remote Debug SAP VM).launch
+++ b/java/com.sap.sailing.server/SailingServer (No Proxy, Remote Debug SAP VM).launch
@@ -15,14 +15,14 @@
-
+
-
+
diff --git a/java/com.sap.sailing.server/SailingServer (No Proxy, winddbTest).launch b/java/com.sap.sailing.server/SailingServer (No Proxy, winddbTest).launch
index f14b6637666..c697f884a12 100755
--- a/java/com.sap.sailing.server/SailingServer (No Proxy, winddbTest).launch
+++ b/java/com.sap.sailing.server/SailingServer (No Proxy, winddbTest).launch
@@ -29,7 +29,7 @@
-
+
diff --git a/java/com.sap.sailing.server/SailingServer (Proxy, Jetty on 8889).launch b/java/com.sap.sailing.server/SailingServer (Proxy, Jetty on 8889).launch
index 6d2ff20591f..9b48f3ec5b0 100755
--- a/java/com.sap.sailing.server/SailingServer (Proxy, Jetty on 8889).launch
+++ b/java/com.sap.sailing.server/SailingServer (Proxy, Jetty on 8889).launch
@@ -23,7 +23,7 @@
-
+
diff --git a/java/com.sap.sailing.server/SailingServer (Proxy, Remote Debug SAP VM).launch b/java/com.sap.sailing.server/SailingServer (Proxy, Remote Debug SAP VM).launch
index 90ea164e7fd..3f70919f0bc 100755
--- a/java/com.sap.sailing.server/SailingServer (Proxy, Remote Debug SAP VM).launch
+++ b/java/com.sap.sailing.server/SailingServer (Proxy, Remote Debug SAP VM).launch
@@ -16,13 +16,13 @@
-
+
-
+
diff --git a/java/com.sap.sailing.server/SailingServer (Proxy, SwissTiming Live Simulation).launch b/java/com.sap.sailing.server/SailingServer (Proxy, SwissTiming Live Simulation).launch
index cfa760728db..5d64c2adeb8 100755
--- a/java/com.sap.sailing.server/SailingServer (Proxy, SwissTiming Live Simulation).launch
+++ b/java/com.sap.sailing.server/SailingServer (Proxy, SwissTiming Live Simulation).launch
@@ -22,7 +22,7 @@
-
+
diff --git a/java/com.sap.sailing.server/SailingServer (Proxy, winddbTest).launch b/java/com.sap.sailing.server/SailingServer (Proxy, winddbTest).launch
index 0f9e209026a..dc1d3ebe3e8 100755
--- a/java/com.sap.sailing.server/SailingServer (Proxy, winddbTest).launch
+++ b/java/com.sap.sailing.server/SailingServer (Proxy, winddbTest).launch
@@ -24,7 +24,7 @@
-
+
diff --git a/java/com.sap.sse.security/src/com/sap/sse/security/jaxrs/api/SecurityResource.java b/java/com.sap.sse.security/src/com/sap/sse/security/jaxrs/api/SecurityResource.java
index ece7d27cbd2..179d3d0d0b6 100644
--- a/java/com.sap.sse.security/src/com/sap/sse/security/jaxrs/api/SecurityResource.java
+++ b/java/com.sap.sse.security/src/com/sap/sse/security/jaxrs/api/SecurityResource.java
@@ -14,10 +14,19 @@ import com.sap.sse.security.jaxrs.AbstractSecurityResource;
@Path("/restsecurity")
public class SecurityResource extends AbstractSecurityResource {
+ /**
+ * Can be used to figure out the current subject. Accepts the GET method. If the subject is
+ * authenticated, the service will respond with a "Hello <subjectname>" message, otherwise
+ * with a generic "Hello!".
+ */
@GET
@Path("/hello")
@Produces("text/plain;charset=UTF-8")
public Response sayHello() {
+ return doSayHello();
+ }
+
+ private Response doSayHello() {
final String messageText;
if (SecurityUtils.getSubject().isAuthenticated()) {
messageText = "Hello "+SecurityUtils.getSubject().getPrincipal();
@@ -27,17 +36,16 @@ public class SecurityResource extends AbstractSecurityResource {
return Response.ok(messageText, MediaType.TEXT_PLAIN_TYPE).build();
}
+ /**
+ * Can be used to figure out the current subject. Accepts the POST method. If the subject is
+ * authenticated, the service will respond with a "Hello <subjectname>" message, otherwise
+ * with a generic "Hello!".
+ */
@POST
@Path("/hello")
@Produces("text/plain;charset=UTF-8")
public Response sayHelloPost() {
- final String messageText;
- if (SecurityUtils.getSubject().isAuthenticated()) {
- messageText = "Hello "+SecurityUtils.getSubject().getPrincipal();
- } else {
- messageText = "Hello!";
- }
- return Response.ok(messageText, MediaType.TEXT_PLAIN_TYPE).build();
+ return doSayHello();
}
@GET