diff --git a/src/main/java/health/ere/ps/service/idp/client/AuthenticatorClient.java b/src/main/java/health/ere/ps/service/idp/client/AuthenticatorClient.java index a4d69278f..457813232 100644 --- a/src/main/java/health/ere/ps/service/idp/client/AuthenticatorClient.java +++ b/src/main/java/health/ere/ps/service/idp/client/AuthenticatorClient.java @@ -31,14 +31,14 @@ import javax.json.JsonString; import javax.ws.rs.core.Response; -import com.diffplug.common.base.Errors; -import com.diffplug.common.base.Throwing; - import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.StringUtils; import org.eclipse.microprofile.rest.client.RestClientBuilder; import org.jose4j.jwt.JwtClaims; +import com.diffplug.common.base.Errors; +import com.diffplug.common.base.Throwing; + import health.ere.ps.exception.idp.IdpClientException; import health.ere.ps.exception.idp.IdpException; import health.ere.ps.exception.idp.IdpJoseException; @@ -338,6 +338,7 @@ public IdpHttpClientService getIdpHttpClientInstanceByUrl(String url) try { idpHttpClientService = RestClientBuilder.newBuilder() .baseUrl(new URL(url)) + .connectTimeout(5000, java.util.concurrent.TimeUnit.MILLISECONDS) .build(IdpHttpClientService.class); } catch (MalformedURLException e) { throw new IdpClientException("Bad URL: " + url, e);