From a59a1c25347e895030b3614e17354a4fa6fa4409 Mon Sep 17 00:00:00 2001 From: Austin Nicholas Date: Mon, 6 Oct 2025 23:45:29 -0400 Subject: [PATCH] feat: add isTokenEndpointIpHeaderTrusted field to Client Add support for the is_token_endpoint_ip_header_trusted property in the Client class with proper JavaDoc documentation and test coverage. - Add isTokenEndpointIpHeaderTrusted field with @JsonProperty annotation - Add getter and setter methods with JavaDoc following class conventions - Update ClientTest with serialization and deserialization tests - Verify all tests pass successfully --- .../com/auth0/json/mgmt/client/Client.java | 20 +++++++++++++++++++ .../auth0/json/mgmt/client/ClientTest.java | 4 ++++ 2 files changed, 24 insertions(+) diff --git a/src/main/java/com/auth0/json/mgmt/client/Client.java b/src/main/java/com/auth0/json/mgmt/client/Client.java index 35be65d26..1a39007d6 100644 --- a/src/main/java/com/auth0/json/mgmt/client/Client.java +++ b/src/main/java/com/auth0/json/mgmt/client/Client.java @@ -31,6 +31,8 @@ public class Client { private String logoUri; @JsonProperty("is_first_party") private Boolean isFirstParty; + @JsonProperty("is_token_endpoint_ip_header_trusted") + private Boolean isTokenEndpointIpHeaderTrusted; @JsonProperty("oidc_conformant") private Boolean oidcConformant; @JsonProperty("callbacks") @@ -284,6 +286,24 @@ public void setIsFirstParty(Boolean isFirstParty) { this.isFirstParty = isFirstParty; } + /** + * Whether the token endpoint IP header is trusted for this application. + * + * @return true if the token endpoint IP header is trusted, false otherwise. + */ + public Boolean getIsTokenEndpointIpHeaderTrusted() { + return isTokenEndpointIpHeaderTrusted; + } + + /** + * Setter for whether the token endpoint IP header is trusted for this application. + * + * @param isTokenEndpointIpHeaderTrusted whether the token endpoint IP header is trusted or not. + */ + public void setIsTokenEndpointIpHeaderTrusted(Boolean isTokenEndpointIpHeaderTrusted) { + this.isTokenEndpointIpHeaderTrusted = isTokenEndpointIpHeaderTrusted; + } + /** * Whether this application will conform to strict Open ID Connect specifications or not. * diff --git a/src/test/java/com/auth0/json/mgmt/client/ClientTest.java b/src/test/java/com/auth0/json/mgmt/client/ClientTest.java index 301976258..89d6082d6 100644 --- a/src/test/java/com/auth0/json/mgmt/client/ClientTest.java +++ b/src/test/java/com/auth0/json/mgmt/client/ClientTest.java @@ -27,6 +27,7 @@ public class ClientTest extends JsonTest { " \"logo_uri\": \"uri\",\n" + " \"oidc_conformant\": true,\n" + " \"is_first_party\": true,\n" + + " \"is_token_endpoint_ip_header_trusted\": true,\n" + " \"initiate_login_uri\": \"https://myhome.com/login\",\n" + " \"callbacks\": [\n" + " \"value\"\n" + @@ -163,6 +164,7 @@ public void shouldSerialize() throws Exception { client.setLogoUri("uri"); client.setOIDCConformant(true); client.setIsFirstParty(true); + client.setIsTokenEndpointIpHeaderTrusted(true); List stringList = Collections.singletonList("value"); client.setCallbacks(stringList); client.setAllowedOrigins(stringList); @@ -251,6 +253,7 @@ public void shouldSerialize() throws Exception { assertThat(serialized, JsonMatcher.hasEntry("oidc_conformant", true)); assertThat(serialized, JsonMatcher.hasEntry("initiate_login_uri", "https://appzero.com/login")); assertThat(serialized, JsonMatcher.hasEntry("is_first_party", true)); + assertThat(serialized, JsonMatcher.hasEntry("is_token_endpoint_ip_header_trusted", true)); assertThat(serialized, JsonMatcher.hasEntry("callbacks", Collections.singletonList("value"))); assertThat(serialized, JsonMatcher.hasEntry("grant_types", Collections.singletonList("value"))); assertThat(serialized, JsonMatcher.hasEntry("allowed_origins", Collections.singletonList("value"))); @@ -298,6 +301,7 @@ public void shouldDeserialize() throws Exception { assertThat(client.isOIDCConformant(), is(true)); assertThat(client.isFirstParty(), is(true)); + assertThat(client.getIsTokenEndpointIpHeaderTrusted(), is(true)); assertThat(client.getCallbacks(), contains("value")); assertThat(client.getWebOrigins(), contains("value"));