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..5d679a6cd 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 Object 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 Object getScope() { return scope; } 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"))); } }