[Minor] Added gson to rest

This commit is contained in:
Robert von Burg 2015-09-28 11:15:07 +02:00
parent 278b3e9b6d
commit d8650b0ab1
4 changed files with 20 additions and 13 deletions

@ -1 +1 @@
Subproject commit 65992ce0ebaf90ea302f5c1ee63b60903664135c
Subproject commit bf15669ef25701e5f75174bf96eb99bed32a88fc

View File

@ -83,7 +83,7 @@
<artifactId>li.strolch.rest</artifactId>
<version>${project.version}</version>
</dependency>
<!-- test -->
<dependency>
<groupId>li.strolch</groupId>
@ -120,6 +120,11 @@
<artifactId>commons-cli</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.3.1</version>
</dependency>
<!-- test -->
<dependency>

View File

@ -83,9 +83,12 @@
<!-- Restful API -->
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<!-- if your container implements Servlet API older than 3.0, use "jersey-container-servlet-core" -->
<artifactId>jersey-container-servlet</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-moxy</artifactId>

View File

@ -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 <eitch@eitchnet.ch>
@ -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);