diff options
Diffstat (limited to 'src/main/java/org/traccar/MainModule.java')
-rw-r--r-- | src/main/java/org/traccar/MainModule.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/MainModule.java b/src/main/java/org/traccar/MainModule.java index 663747de1..417844f50 100644 --- a/src/main/java/org/traccar/MainModule.java +++ b/src/main/java/org/traccar/MainModule.java @@ -87,6 +87,7 @@ import org.traccar.storage.DatabaseStorage; import org.traccar.storage.MemoryStorage; import org.traccar.storage.Storage; import org.traccar.web.WebServer; +import org.traccar.api.security.OpenIDProvider; import javax.annotation.Nullable; import javax.inject.Singleton; @@ -169,6 +170,15 @@ public class MainModule extends AbstractModule { } return null; } + + @Singleton + @Provides + public static OpenIDProvider provideOpenIDProvider(Config config) { + if (config.getBoolean(Keys.OIDC_ENABLE)) { + return new OpenIDProvider(config); + } + return null; + } @Provides public static WebServer provideWebServer(Injector injector, Config config) { |