aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/MainModule.java
diff options
context:
space:
mode:
authorDaniel <djr2468@gmail.com>2023-04-05 20:40:09 +0100
committerDaniel <djr2468@gmail.com>2023-04-05 20:40:09 +0100
commit5ba5cc8291d0bd5d497563ddebf08dfc6d239ee9 (patch)
tree559cc6fd40871614c0118bcda8fe2bbd08e3b4a7 /src/main/java/org/traccar/MainModule.java
parentc56b136a328bc1781ccc74aa27fdecf4a17b9595 (diff)
downloadtrackermap-server-5ba5cc8291d0bd5d497563ddebf08dfc6d239ee9.tar.gz
trackermap-server-5ba5cc8291d0bd5d497563ddebf08dfc6d239ee9.tar.bz2
trackermap-server-5ba5cc8291d0bd5d497563ddebf08dfc6d239ee9.zip
Review changes
Diffstat (limited to 'src/main/java/org/traccar/MainModule.java')
-rw-r--r--src/main/java/org/traccar/MainModule.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/org/traccar/MainModule.java b/src/main/java/org/traccar/MainModule.java
index 51097511a..220798767 100644
--- a/src/main/java/org/traccar/MainModule.java
+++ b/src/main/java/org/traccar/MainModule.java
@@ -97,6 +97,7 @@ import javax.ws.rs.client.ClientBuilder;
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;
+import java.net.http.HttpClient;
import java.util.Properties;
public class MainModule extends AbstractModule {
@@ -174,11 +175,12 @@ public class MainModule extends AbstractModule {
@Singleton
@Provides
- public static OpenIdProvider provideOpenIDProvider(Config config, LoginService loginService) {
- if (config.hasKey(Keys.OPENID_CLIENTID)) {
- return new OpenIdProvider(config, loginService);
- }
- return null;
+ public static OpenIdProvider provideOpenIDProvider(
+ Config config, LoginService loginService, ObjectMapper objectMapper) throws InterruptedException, IOException {
+ if (config.hasKey(Keys.OPENID_CLIENT_ID)) {
+ return new OpenIdProvider(config, loginService, HttpClient.newHttpClient(), objectMapper);
+ }
+ return null;
}
@Provides