Skip to content

Commit

Permalink
Organizations API no longer returns enabled_connections
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyjames committed Jan 24, 2024
1 parent 8c1f794 commit 354f2de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.auth0.json.mgmt.organizations;

import com.auth0.client.mgmt.filter.PageFilter;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
Expand Down Expand Up @@ -114,7 +115,11 @@ public void setMetadata(Map<String, Object> metadata) {

/**
* @return the enabled connections of this Organization.
* @deprecated the {@code enabled_connections} property was removed from the API response body, so this will always
* return {@code null}. Use {@link com.auth0.client.mgmt.OrganizationsEntity#getConnections(String, PageFilter)}
* instead.
*/
@Deprecated
public List<EnabledConnection> getEnabledConnections() {
return enabledConnections;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,7 @@ public void shouldDeserialize() throws Exception {
" },\n" +
" \"metadata\": {\n" +
" \"key1\": \"val1\"\n" +
" },\n" +
" \"enabled_connections\": [\n" +
" {\n" +
" \"connection_id\": \"con-1\",\n" +
" \"assign_membership_on_login\": \"false\"\n" +
" }\n" +
" ]\n" +
" }\n" +
" }";

Organization org = fromJSON(orgJson, Organization.class);
Expand All @@ -51,8 +45,6 @@ public void shouldDeserialize() throws Exception {
assertThat(org.getBranding().getColors().getPageBackground(), is("#FF0000"));
assertThat(org.getMetadata(), is(notNullValue()));
assertThat(org.getMetadata().get("key1"), is("val1"));
assertThat(org.getEnabledConnections().get(0).getConnectionId(), is("con-1"));
assertThat(org.getEnabledConnections().get(0).isAssignMembershipOnLogin(), is(false));
}

@Test
Expand Down

0 comments on commit 354f2de

Please sign in to comment.