diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-02 12:06:00 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-02 12:06:00 +1300 |
commit | a0c9cec5beb28448073b127c31df23134336f4cf (patch) | |
tree | c52c396dbfaf4b10084677af1720908efc00c7cb /src/org | |
parent | a0a96b253b90d389a5c06ba1133b2a2f32ecb0fc (diff) | |
download | trackermap-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')
-rw-r--r-- | src/org/traccar/api/resource/SessionResource.java | 8 |
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(); + } + } |