diff options
author | Dan <djr2468@gmail.com> | 2023-04-03 12:12:38 +0100 |
---|---|---|
committer | Dan <djr2468@gmail.com> | 2023-04-03 12:12:38 +0100 |
commit | faf5567add4cf343cc38b3c7dcb297c7cbed88bc (patch) | |
tree | 22e6f9e9559883f31ab9812e437f43a10e143822 /src/main/java/org/traccar/MainModule.java | |
parent | 2cc1cb3c7530fdabb750a9e0b5cc26e3e2286185 (diff) | |
download | trackermap-server-faf5567add4cf343cc38b3c7dcb297c7cbed88bc.tar.gz trackermap-server-faf5567add4cf343cc38b3c7dcb297c7cbed88bc.tar.bz2 trackermap-server-faf5567add4cf343cc38b3c7dcb297c7cbed88bc.zip |
First pass
Diffstat (limited to 'src/main/java/org/traccar/MainModule.java')
-rw-r--r-- | src/main/java/org/traccar/MainModule.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/MainModule.java b/src/main/java/org/traccar/MainModule.java index 7def97657..7b06b4840 100644 --- a/src/main/java/org/traccar/MainModule.java +++ b/src/main/java/org/traccar/MainModule.java @@ -33,6 +33,7 @@ import org.traccar.broadcast.NullBroadcastService; import org.traccar.config.Config; import org.traccar.config.Keys; import org.traccar.database.LdapProvider; +import org.traccar.database.OpenIdProvider; import org.traccar.database.StatisticsManager; import org.traccar.forward.EventForwarder; import org.traccar.forward.EventForwarderJson; @@ -88,7 +89,6 @@ import org.traccar.storage.MemoryStorage; import org.traccar.storage.Storage; import org.traccar.web.WebServer; import org.traccar.api.security.LoginService; -import org.traccar.api.security.OpenIDProvider; import javax.annotation.Nullable; import javax.inject.Singleton; @@ -174,9 +174,9 @@ public class MainModule extends AbstractModule { @Singleton @Provides - public static OpenIDProvider provideOpenIDProvider(Config config, LoginService loginService, Storage storage) { - if (config.getBoolean(Keys.OIDC_ENABLE)) { - return new OpenIDProvider(config, loginService, storage); + public static OpenIdProvider provideOpenIDProvider(Config config, LoginService loginService) { + if (config.hasKey(Keys.OPENID_CLIENTID)) { + return new OpenIdProvider(config, loginService); } return null; } |