Skip to content
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
22 changes: 22 additions & 0 deletions src/main/java/com/auth0/json/mgmt/client/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -295,6 +297,26 @@ 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.
*/
@JsonProperty("is_token_endpoint_ip_header_trusted")
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.
*/
@JsonProperty("is_token_endpoint_ip_header_trusted")
public void setIsTokenEndpointIpHeaderTrusted(Boolean isTokenEndpointIpHeaderTrusted) {
this.isTokenEndpointIpHeaderTrusted = isTokenEndpointIpHeaderTrusted;
}

/**
* Whether this application will conform to strict Open ID Connect specifications or not.
*
Expand Down
4 changes: 4 additions & 0 deletions src/test/java/com/auth0/json/mgmt/client/ClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class ClientTest extends JsonTest<Client> {
" \"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" +
Expand Down Expand Up @@ -163,6 +164,7 @@ public void shouldSerialize() throws Exception {
client.setLogoUri("uri");
client.setOIDCConformant(true);
client.setIsFirstParty(true);
client.setIsTokenEndpointIpHeaderTrusted(true);
List<String> stringList = Collections.singletonList("value");
client.setCallbacks(stringList);
client.setAllowedOrigins(stringList);
Expand Down Expand Up @@ -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")));
Expand Down Expand Up @@ -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"));
Expand Down