From 311570a83a8ceb0c8e1cbc3a51fee6b3050ed029 Mon Sep 17 00:00:00 2001 From: tanya732 Date: Mon, 28 Apr 2025 11:34:18 +0530 Subject: [PATCH 1/3] Fixed scope field in LogEvent class --- src/main/java/com/auth0/json/mgmt/logevents/LogEvent.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/auth0/json/mgmt/logevents/LogEvent.java b/src/main/java/com/auth0/json/mgmt/logevents/LogEvent.java index f813d99cc..75ed4d139 100644 --- a/src/main/java/com/auth0/json/mgmt/logevents/LogEvent.java +++ b/src/main/java/com/auth0/json/mgmt/logevents/LogEvent.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Date; +import java.util.List; import java.util.Map; /** @@ -50,7 +51,7 @@ public class LogEvent { @JsonProperty("audience") private String audience; @JsonProperty("scope") - private String scope; + private List scope; @JsonProperty("strategy") private String strategy; @JsonProperty("strategy_type") @@ -154,7 +155,7 @@ public String getUserId() { * @return the scope. */ @JsonProperty("scope") - public String getScope() { + public List getScope() { return scope; } From 0380ca6863b7d738c47a83221c3e4770c9ef6d54 Mon Sep 17 00:00:00 2001 From: tanya732 Date: Tue, 29 Apr 2025 11:15:09 +0530 Subject: [PATCH 2/3] Updated the scope field --- src/main/java/com/auth0/json/mgmt/logevents/LogEvent.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/auth0/json/mgmt/logevents/LogEvent.java b/src/main/java/com/auth0/json/mgmt/logevents/LogEvent.java index 75ed4d139..5d679a6cd 100644 --- a/src/main/java/com/auth0/json/mgmt/logevents/LogEvent.java +++ b/src/main/java/com/auth0/json/mgmt/logevents/LogEvent.java @@ -51,7 +51,7 @@ public class LogEvent { @JsonProperty("audience") private String audience; @JsonProperty("scope") - private List scope; + private Object scope; @JsonProperty("strategy") private String strategy; @JsonProperty("strategy_type") @@ -155,7 +155,7 @@ public String getUserId() { * @return the scope. */ @JsonProperty("scope") - public List getScope() { + public Object getScope() { return scope; } From 7e51e13eb0120c2a6c8467d10458bd36b62f010b Mon Sep 17 00:00:00 2001 From: tanya732 Date: Mon, 5 May 2025 18:20:17 +0530 Subject: [PATCH 3/3] added test case --- .../java/com/auth0/json/mgmt/logevents/LogEventTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test/java/com/auth0/json/mgmt/logevents/LogEventTest.java b/src/test/java/com/auth0/json/mgmt/logevents/LogEventTest.java index 9d9b791fc..fafcf175c 100644 --- a/src/test/java/com/auth0/json/mgmt/logevents/LogEventTest.java +++ b/src/test/java/com/auth0/json/mgmt/logevents/LogEventTest.java @@ -3,6 +3,8 @@ import com.auth0.json.JsonTest; import org.junit.jupiter.api.Test; +import java.util.Arrays; + import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; @@ -34,7 +36,8 @@ public class LogEventTest extends JsonTest { " \"tenant_name\": \"paid-testing\",\n" + " \"audience\": \"audience\",\n" + " \"isMobile\": \"false\",\n" + - " \"user_agent\": \"okhttp 4.11.0 / Other 0.0.0\"\n" + + " \"user_agent\": \"okhttp 4.11.0 / Other 0.0.0\",\n" + + " \"scope\": [\"read:client_grants\", \"create:client_grants\"]\n" + "}"; @Test @@ -64,5 +67,6 @@ public void shouldDeserialize() throws Exception { assertThat(logEvent.getOrganizationName(), is("org2")); assertThat(logEvent.getTenantName(), is("paid-testing")); assertThat(logEvent.getEventSchema(), is(notNullValue())); + assertThat(logEvent.getScope(), is(Arrays.asList("read:client_grants", "create:client_grants"))); } }