|
9 | 9 |
|
10 | 10 | package org.elasticsearch.xpack.security.authz.microsoft; |
11 | 11 |
|
12 | | -import com.azure.core.http.HttpClient; |
| 12 | +import okhttp3.OkHttpClient; |
| 13 | + |
13 | 14 | import com.azure.core.http.okhttp.OkHttpAsyncHttpClientBuilder; |
14 | | -import com.azure.core.http.policy.RetryPolicy; |
15 | | -import com.azure.core.util.HttpClientOptions; |
16 | 15 | import com.azure.identity.ClientSecretCredentialBuilder; |
17 | 16 | import com.microsoft.graph.core.requests.BaseGraphRequestAdapter; |
18 | 17 | import com.microsoft.graph.core.tasks.PageIterator; |
19 | 18 | import com.microsoft.graph.models.Group; |
20 | 19 | import com.microsoft.graph.models.GroupCollectionResponse; |
21 | 20 | import com.microsoft.graph.serviceclient.GraphServiceClient; |
22 | 21 | import com.microsoft.kiota.authentication.AzureIdentityAuthenticationProvider; |
23 | | - |
24 | 22 | import com.microsoft.kiota.http.middleware.RetryHandler; |
25 | 23 |
|
26 | | -import okhttp3.OkHttpClient; |
27 | | - |
28 | 24 | import org.elasticsearch.action.ActionListener; |
29 | 25 | import org.elasticsearch.common.Strings; |
30 | 26 | import org.elasticsearch.common.settings.Setting; |
@@ -161,8 +157,7 @@ private static GraphServiceClient buildClient(RealmConfig config) { |
161 | 157 | final var clientSecret = config.getSetting(MicrosoftGraphAuthzRealmSettings.CLIENT_SECRET); |
162 | 158 |
|
163 | 159 | final var timeout = config.getSetting(MicrosoftGraphAuthzRealmSettings.HTTP_REQUEST_TIMEOUT); |
164 | | - final var httpClient = new OkHttpClient.Builder() |
165 | | - .callTimeout(Duration.ofSeconds(timeout.seconds())) |
| 160 | + final var httpClient = new OkHttpClient.Builder().callTimeout(Duration.ofSeconds(timeout.seconds())) |
166 | 161 | .addInterceptor(new RetryHandler()) |
167 | 162 | .build(); |
168 | 163 |
|
|
0 commit comments