From d8650b0ab1369703498814df2b89f465c9ef740e Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Mon, 28 Sep 2015 11:15:07 +0200 Subject: [PATCH] [Minor] Added gson to rest --- ch.eitchnet.privilege | 2 +- li.strolch.parent/pom.xml | 7 ++++++- li.strolch.rest/pom.xml | 5 ++++- .../rest/endpoint/AuthenticationService.java | 19 +++++++++---------- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/ch.eitchnet.privilege b/ch.eitchnet.privilege index 65992ce0e..bf15669ef 160000 --- a/ch.eitchnet.privilege +++ b/ch.eitchnet.privilege @@ -1 +1 @@ -Subproject commit 65992ce0ebaf90ea302f5c1ee63b60903664135c +Subproject commit bf15669ef25701e5f75174bf96eb99bed32a88fc diff --git a/li.strolch.parent/pom.xml b/li.strolch.parent/pom.xml index 629dd7272..b0d1c61f3 100644 --- a/li.strolch.parent/pom.xml +++ b/li.strolch.parent/pom.xml @@ -83,7 +83,7 @@ li.strolch.rest ${project.version} - + li.strolch @@ -120,6 +120,11 @@ commons-cli 1.2 + + com.google.code.gson + gson + 2.3.1 + diff --git a/li.strolch.rest/pom.xml b/li.strolch.rest/pom.xml index bd3dcba7c..f4b6ae2d4 100644 --- a/li.strolch.rest/pom.xml +++ b/li.strolch.rest/pom.xml @@ -83,9 +83,12 @@ org.glassfish.jersey.containers - jersey-container-servlet + + com.google.code.gson + gson + org.glassfish.jersey.media jersey-media-moxy diff --git a/li.strolch.rest/src/main/java/li/strolch/rest/endpoint/AuthenticationService.java b/li.strolch.rest/src/main/java/li/strolch/rest/endpoint/AuthenticationService.java index e3a2e4def..7f0576f18 100644 --- a/li.strolch.rest/src/main/java/li/strolch/rest/endpoint/AuthenticationService.java +++ b/li.strolch.rest/src/main/java/li/strolch/rest/endpoint/AuthenticationService.java @@ -32,14 +32,6 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; -import li.strolch.exception.StrolchException; -import li.strolch.rest.RestfulStrolchComponent; -import li.strolch.rest.StrolchSessionHandler; -import li.strolch.rest.model.Login; -import li.strolch.rest.model.LoginResult; -import li.strolch.rest.model.LogoutResult; -import li.strolch.runtime.privilege.PrivilegeHandler; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -49,6 +41,13 @@ import ch.eitchnet.privilege.model.Certificate; import ch.eitchnet.privilege.model.IPrivilege; import ch.eitchnet.privilege.model.PrivilegeContext; import ch.eitchnet.utils.helper.StringHelper; +import li.strolch.exception.StrolchException; +import li.strolch.rest.RestfulStrolchComponent; +import li.strolch.rest.StrolchSessionHandler; +import li.strolch.rest.model.Login; +import li.strolch.rest.model.LoginResult; +import li.strolch.rest.model.LogoutResult; +import li.strolch.runtime.privilege.PrivilegeHandler; /** * @author Robert von Burg @@ -138,8 +137,8 @@ public class AuthenticationService { try { - StrolchSessionHandler sessionHandlerHandler = RestfulStrolchComponent.getInstance().getComponent( - StrolchSessionHandler.class); + StrolchSessionHandler sessionHandlerHandler = RestfulStrolchComponent.getInstance() + .getComponent(StrolchSessionHandler.class); Certificate certificate = sessionHandlerHandler.validate(sessionId); sessionHandlerHandler.invalidate(certificate);