aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-12-02 10:42:36 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-12-02 10:42:36 +1300
commitfe599125befa708ec3547b591918effe2ff9beb8 (patch)
tree11bc8413e54368e3c2713c80c46c2d12a27ae6a4 /src/org/traccar/web
parent2d6533ef6ba4fd436c5737f3755dd34a4c08e8e7 (diff)
downloadtrackermap-server-fe599125befa708ec3547b591918effe2ff9beb8.tar.gz
trackermap-server-fe599125befa708ec3547b591918effe2ff9beb8.tar.bz2
trackermap-server-fe599125befa708ec3547b591918effe2ff9beb8.zip
Add session authentication option
Diffstat (limited to 'src/org/traccar/web')
-rw-r--r--src/org/traccar/web/WebServer.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/web/WebServer.java b/src/org/traccar/web/WebServer.java
index f139b1c7a..ad40e246f 100644
--- a/src/org/traccar/web/WebServer.java
+++ b/src/org/traccar/web/WebServer.java
@@ -30,6 +30,7 @@ import org.traccar.Config;
import org.traccar.api.CorsResponseFilter;
import org.traccar.api.SecurityRequestFilter;
import org.traccar.api.resource.DeviceResource;
+import org.traccar.api.resource.ServerResource;
import org.traccar.api.resource.SessionResource;
import org.traccar.api.resource.UserResource;
import org.traccar.helper.Log;
@@ -137,7 +138,8 @@ public class WebServer {
ResourceConfig resourceConfig = new ResourceConfig();
resourceConfig.register(SecurityRequestFilter.class);
resourceConfig.register(CorsResponseFilter.class);
- resourceConfig.registerClasses(SessionResource.class, DeviceResource.class, UserResource.class);
+ resourceConfig.registerClasses(
+ ServerResource.class, SessionResource.class, DeviceResource.class, UserResource.class);
ServletContextHandler servletHandler = new ServletContextHandler(ServletContextHandler.SESSIONS);
ServletHolder servletHolder = new ServletHolder(new ServletContainer(resourceConfig));
servletHandler.addServlet(servletHolder, "/rest/*");