Skip to content

Commit 2e1999d

Browse files
tanya732adenix
andauthored
Adenix/client is token endpoint id header trusted (#782)
Co-authored-by: Austin Nicholas <anicholas@netflix.com>
1 parent e721c31 commit 2e1999d

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

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

Lines changed: 22 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")
@@ -295,6 +297,26 @@ public void setIsFirstParty(Boolean isFirstParty) {
295297
this.isFirstParty = isFirstParty;
296298
}
297299

300+
/**
301+
* Whether the token endpoint IP header is trusted for this application.
302+
*
303+
* @return true if the token endpoint IP header is trusted, false otherwise.
304+
*/
305+
@JsonProperty("is_token_endpoint_ip_header_trusted")
306+
public Boolean getIsTokenEndpointIpHeaderTrusted() {
307+
return isTokenEndpointIpHeaderTrusted;
308+
}
309+
310+
/**
311+
* Setter for whether the token endpoint IP header is trusted for this application.
312+
*
313+
* @param isTokenEndpointIpHeaderTrusted whether the token endpoint IP header is trusted or not.
314+
*/
315+
@JsonProperty("is_token_endpoint_ip_header_trusted")
316+
public void setIsTokenEndpointIpHeaderTrusted(Boolean isTokenEndpointIpHeaderTrusted) {
317+
this.isTokenEndpointIpHeaderTrusted = isTokenEndpointIpHeaderTrusted;
318+
}
319+
298320
/**
299321
* Whether this application will conform to strict Open ID Connect specifications or not.
300322
*

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)