Skip to content

Commit d2113e9

Browse files
adenixAustin Nicholas
authored andcommitted
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
1 parent cda78f9 commit d2113e9

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/main/java/com/auth0/json/mgmt/client/Client.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ public class Client {
3131
private String logoUri;
3232
@JsonProperty("is_first_party")
3333
private Boolean isFirstParty;
34+
@JsonProperty("is_token_endpoint_ip_header_trusted")
35+
private Boolean isTokenEndpointIpHeaderTrusted;
3436
@JsonProperty("oidc_conformant")
3537
private Boolean oidcConformant;
3638
@JsonProperty("callbacks")
@@ -284,6 +286,24 @@ public void setIsFirstParty(Boolean isFirstParty) {
284286
this.isFirstParty = isFirstParty;
285287
}
286288

289+
/**
290+
* Whether the token endpoint IP header is trusted for this application.
291+
*
292+
* @return true if the token endpoint IP header is trusted, false otherwise.
293+
*/
294+
public Boolean getIsTokenEndpointIpHeaderTrusted() {
295+
return isTokenEndpointIpHeaderTrusted;
296+
}
297+
298+
/**
299+
* Setter for whether the token endpoint IP header is trusted for this application.
300+
*
301+
* @param isTokenEndpointIpHeaderTrusted whether the token endpoint IP header is trusted or not.
302+
*/
303+
public void setIsTokenEndpointIpHeaderTrusted(Boolean isTokenEndpointIpHeaderTrusted) {
304+
this.isTokenEndpointIpHeaderTrusted = isTokenEndpointIpHeaderTrusted;
305+
}
306+
287307
/**
288308
* Whether this application will conform to strict Open ID Connect specifications or not.
289309
*

src/test/java/com/auth0/json/mgmt/client/ClientTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public class ClientTest extends JsonTest<Client> {
2727
" \"logo_uri\": \"uri\",\n" +
2828
" \"oidc_conformant\": true,\n" +
2929
" \"is_first_party\": true,\n" +
30+
" \"is_token_endpoint_ip_header_trusted\": true,\n" +
3031
" \"initiate_login_uri\": \"https://myhome.com/login\",\n" +
3132
" \"callbacks\": [\n" +
3233
" \"value\"\n" +
@@ -163,6 +164,7 @@ public void shouldSerialize() throws Exception {
163164
client.setLogoUri("uri");
164165
client.setOIDCConformant(true);
165166
client.setIsFirstParty(true);
167+
client.setIsTokenEndpointIpHeaderTrusted(true);
166168
List<String> stringList = Collections.singletonList("value");
167169
client.setCallbacks(stringList);
168170
client.setAllowedOrigins(stringList);
@@ -251,6 +253,7 @@ public void shouldSerialize() throws Exception {
251253
assertThat(serialized, JsonMatcher.hasEntry("oidc_conformant", true));
252254
assertThat(serialized, JsonMatcher.hasEntry("initiate_login_uri", "https://appzero.com/login"));
253255
assertThat(serialized, JsonMatcher.hasEntry("is_first_party", true));
256+
assertThat(serialized, JsonMatcher.hasEntry("is_token_endpoint_ip_header_trusted", true));
254257
assertThat(serialized, JsonMatcher.hasEntry("callbacks", Collections.singletonList("value")));
255258
assertThat(serialized, JsonMatcher.hasEntry("grant_types", Collections.singletonList("value")));
256259
assertThat(serialized, JsonMatcher.hasEntry("allowed_origins", Collections.singletonList("value")));
@@ -298,6 +301,7 @@ public void shouldDeserialize() throws Exception {
298301

299302
assertThat(client.isOIDCConformant(), is(true));
300303
assertThat(client.isFirstParty(), is(true));
304+
assertThat(client.getIsTokenEndpointIpHeaderTrusted(), is(true));
301305

302306
assertThat(client.getCallbacks(), contains("value"));
303307
assertThat(client.getWebOrigins(), contains("value"));

0 commit comments

Comments
 (0)