Skip to content

Commit

Permalink
Organizations API no longer returns enabled_connections (#604)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyjames committed Jan 24, 2024
1 parent 8c1f794 commit 770e47d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .snyk
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ ignore:
SNYK-JAVA-ORGJETBRAINSKOTLIN-2393744:
- '*':
reason: 'unaffected, only affects createTempFile and createTempDir kotlin function, which are not used'
expires: 2023-12-31T00:00:00.000Z
expires: 2024-12-31T00:00:00.000Z
SNYK-JAVA-ORGBOUNCYCASTLE-5771339:
- '*':
reason: 'test-only dependency, no update available'
expires: 2023-12-31T00:00:00.000Z
expires: 2024-12-31T00:00:00.000Z
SNYK-JAVA-ORGBOUNCYCASTLE-6084022:
- '*':
reason: 'test-only dependency, no update available'
expires: 2023-12-31T00:00:00.000Z
expires: 2024-12-31T00:00:00.000Z

patch: {}
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 770e47d

Please sign in to comment.