aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/resource
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-12-02 12:06:00 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-12-02 12:06:00 +1300
commita0c9cec5beb28448073b127c31df23134336f4cf (patch)
treec52c396dbfaf4b10084677af1720908efc00c7cb /src/org/traccar/api/resource
parenta0a96b253b90d389a5c06ba1133b2a2f32ecb0fc (diff)
downloadtrackermap-server-a0c9cec5beb28448073b127c31df23134336f4cf.tar.gz
trackermap-server-a0c9cec5beb28448073b127c31df23134336f4cf.tar.bz2
trackermap-server-a0c9cec5beb28448073b127c31df23134336f4cf.zip
Implement REST login in the web app
Diffstat (limited to 'src/org/traccar/api/resource')
-rw-r--r--src/org/traccar/api/resource/SessionResource.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/org/traccar/api/resource/SessionResource.java b/src/org/traccar/api/resource/SessionResource.java
index fc0741f8c..347beb9a3 100644
--- a/src/org/traccar/api/resource/SessionResource.java
+++ b/src/org/traccar/api/resource/SessionResource.java
@@ -21,10 +21,12 @@ import org.traccar.model.User;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
import javax.ws.rs.FormParam;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
@@ -70,4 +72,10 @@ public class SessionResource extends BaseResource {
}
}
+ @DELETE
+ public Response remove() {
+ req.getSession().removeAttribute(USER_ID_KEY);
+ return Response.noContent().build();
+ }
+
}