Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organizations API no longer returns enabled_connections #604

Merged
merged 2 commits into from
Jan 24, 2024
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
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