diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-01 16:28:14 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-01 16:28:14 +1300 |
commit | f748f065a01fa984a41ca679ca05bcff97769b25 (patch) | |
tree | 88f75bea9ff0143e100002e8788d850783db8499 /src/org/traccar/web/WebServer.java | |
parent | 1742c5a6e9e5cf6d6f2d22278fa5d6600e4b7988 (diff) | |
download | trackermap-server-f748f065a01fa984a41ca679ca05bcff97769b25.tar.gz trackermap-server-f748f065a01fa984a41ca679ca05bcff97769b25.tar.bz2 trackermap-server-f748f065a01fa984a41ca679ca05bcff97769b25.zip |
Add session resource for authentication
Diffstat (limited to 'src/org/traccar/web/WebServer.java')
-rw-r--r-- | src/org/traccar/web/WebServer.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/web/WebServer.java b/src/org/traccar/web/WebServer.java index 317e4db46..f139b1c7a 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.SessionResource; import org.traccar.api.resource.UserResource; import org.traccar.helper.Log; @@ -136,8 +137,8 @@ public class WebServer { ResourceConfig resourceConfig = new ResourceConfig(); resourceConfig.register(SecurityRequestFilter.class); resourceConfig.register(CorsResponseFilter.class); - resourceConfig.registerClasses(DeviceResource.class, UserResource.class); - ServletContextHandler servletHandler = new ServletContextHandler(ServletContextHandler.NO_SESSIONS); + resourceConfig.registerClasses(SessionResource.class, DeviceResource.class, UserResource.class); + ServletContextHandler servletHandler = new ServletContextHandler(ServletContextHandler.SESSIONS); ServletHolder servletHolder = new ServletHolder(new ServletContainer(resourceConfig)); servletHandler.addServlet(servletHolder, "/rest/*"); handlers.addHandler(servletHandler); |