Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PN-9088: add connection and read timeout for assertion and IDP client #94

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* (C)2023 */
/* (C)2024 */
package it.pagopa.tech.lollipop.consumer.assertion.client.simple;

import java.time.Duration;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
Expand All @@ -17,4 +18,8 @@ public class AssertionSimpleClientConfig {
@Builder.Default private String assertionRequestEndpoint = "/assertions";

@Builder.Default private String subscriptionKey = "FakeSubscriptionKey";

private Duration readTimeout;

private Duration connectionTimeout;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* (C)2023 */
/* (C)2024 */
package it.pagopa.tech.lollipop.consumer.assertion.client.simple.internal;

import static java.nio.charset.StandardCharsets.UTF_8;
Expand Down Expand Up @@ -68,8 +68,8 @@ public ApiClient(AssertionSimpleClientConfig config) {
this.mapper = createDefaultObjectMapper();
updateBaseUri(config.getBaseUri());
interceptor = t -> t.header("Ocp-Apim-Subscription-Key", config.getSubscriptionKey());
readTimeout = null;
connectTimeout = null;
readTimeout = config.getReadTimeout();
connectTimeout = config.getConnectionTimeout();
responseInterceptor = null;
asyncResponseInterceptor = null;
this.assertionRequestEndpoint = config.getAssertionRequestEndpoint();
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repositories {
}

allprojects {
version = '1.0.0-RC5'
version = '1.0.0-RC6'
group = 'it.pagopa.tech.lollipop-consumer-java-sdk'
sourceCompatibility = '11'
targetCompatibility = '11'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* (C)2023 */
/* (C)2024 */
package it.pagopa.tech.lollipop.consumer.idp.client.simple;

import java.time.Duration;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand All @@ -22,4 +23,8 @@ public class IdpCertSimpleClientConfig {
@Builder.Default private String idpKeysCieEndpoint = "/idp-keys/cie";

@Builder.Default private String idpKeysSpidEndpoint = "/idp-keys/spid";

private Duration readTimeout;

private Duration connectionTimeout;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* (C)2022-2023 */
/* (C)2024 */
package it.pagopa.tech.lollipop.consumer.idp.client.simple.internal;

import static java.nio.charset.StandardCharsets.UTF_8;
Expand Down Expand Up @@ -72,8 +72,8 @@ public ApiClient(IdpCertSimpleClientConfig config) {
this.xmlMapper = createDefaultXmlMapper();
updateBaseUri(config.getBaseUri());
interceptor = null;
readTimeout = null;
connectTimeout = null;
readTimeout = config.getReadTimeout();
connectTimeout = config.getConnectionTimeout();
responseInterceptor = null;
asyncResponseInterceptor = null;
this.idpKeysCieEndpoint = config.getIdpKeysCieEndpoint();
Expand Down
Loading