[Minor] Added gson to rest
This commit is contained in:
parent
278b3e9b6d
commit
d8650b0ab1
|
@ -1 +1 @@
|
||||||
Subproject commit 65992ce0ebaf90ea302f5c1ee63b60903664135c
|
Subproject commit bf15669ef25701e5f75174bf96eb99bed32a88fc
|
|
@ -83,7 +83,7 @@
|
||||||
<artifactId>li.strolch.rest</artifactId>
|
<artifactId>li.strolch.rest</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- test -->
|
<!-- test -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>li.strolch</groupId>
|
<groupId>li.strolch</groupId>
|
||||||
|
@ -120,6 +120,11 @@
|
||||||
<artifactId>commons-cli</artifactId>
|
<artifactId>commons-cli</artifactId>
|
||||||
<version>1.2</version>
|
<version>1.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.code.gson</groupId>
|
||||||
|
<artifactId>gson</artifactId>
|
||||||
|
<version>2.3.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- test -->
|
<!-- test -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -83,9 +83,12 @@
|
||||||
<!-- Restful API -->
|
<!-- Restful API -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.glassfish.jersey.containers</groupId>
|
<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>
|
<artifactId>jersey-container-servlet</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.code.gson</groupId>
|
||||||
|
<artifactId>gson</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.glassfish.jersey.media</groupId>
|
<groupId>org.glassfish.jersey.media</groupId>
|
||||||
<artifactId>jersey-media-moxy</artifactId>
|
<artifactId>jersey-media-moxy</artifactId>
|
||||||
|
|
|
@ -32,14 +32,6 @@ import javax.ws.rs.core.MediaType;
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.Response.Status;
|
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.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
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.IPrivilege;
|
||||||
import ch.eitchnet.privilege.model.PrivilegeContext;
|
import ch.eitchnet.privilege.model.PrivilegeContext;
|
||||||
import ch.eitchnet.utils.helper.StringHelper;
|
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>
|
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||||
|
@ -138,8 +137,8 @@ public class AuthenticationService {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
StrolchSessionHandler sessionHandlerHandler = RestfulStrolchComponent.getInstance().getComponent(
|
StrolchSessionHandler sessionHandlerHandler = RestfulStrolchComponent.getInstance()
|
||||||
StrolchSessionHandler.class);
|
.getComponent(StrolchSessionHandler.class);
|
||||||
Certificate certificate = sessionHandlerHandler.validate(sessionId);
|
Certificate certificate = sessionHandlerHandler.validate(sessionId);
|
||||||
sessionHandlerHandler.invalidate(certificate);
|
sessionHandlerHandler.invalidate(certificate);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue