aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Context.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-11-11 18:40:40 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-11-11 18:40:40 +1300
commit1908351b442732acc375397648a6834f09c0d9c4 (patch)
tree9814b1273b991ebe9831c53482cd083bcb149661 /src/org/traccar/Context.java
parent204b1074ee57960775066c7c483d54bab8ebf279 (diff)
downloadtrackermap-server-1908351b442732acc375397648a6834f09c0d9c4.tar.gz
trackermap-server-1908351b442732acc375397648a6834f09c0d9c4.tar.bz2
trackermap-server-1908351b442732acc375397648a6834f09c0d9c4.zip
Implement LDAP authentication
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r--src/org/traccar/Context.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java
index 237da40c8..9a48b2740 100644
--- a/src/org/traccar/Context.java
+++ b/src/org/traccar/Context.java
@@ -34,6 +34,7 @@ import org.traccar.database.DataManager;
import org.traccar.database.DeviceManager;
import org.traccar.database.DriversManager;
import org.traccar.database.IdentityManager;
+import org.traccar.database.LdapProvider;
import org.traccar.database.MediaManager;
import org.traccar.database.NotificationManager;
import org.traccar.database.PermissionsManager;
@@ -109,6 +110,12 @@ public final class Context {
return dataManager;
}
+ private static LdapProvider ldapProvider;
+
+ public static LdapProvider getLdapProvider() {
+ return ldapProvider;
+ }
+
private static MediaManager mediaManager;
public static MediaManager getMediaManager() {
@@ -321,6 +328,10 @@ public final class Context {
dataManager = new DataManager(config);
}
+ if (config.getBoolean("ldap.enable")) {
+ ldapProvider = new LdapProvider(config.getString("ldap.url"), config.getString("ldap.context"));
+ }
+
if (config.hasKey("media.path")) {
mediaManager = new MediaManager(config);
}