Skip to content

Commit 81f64d6

Browse files
authored
Fix log event (#711)
1 parent 8959fc1 commit 81f64d6

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/main/java/com/auth0/json/mgmt/logevents/LogEvent.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.fasterxml.jackson.annotation.JsonProperty;
77

88
import java.util.Date;
9+
import java.util.List;
910
import java.util.Map;
1011

1112
/**
@@ -50,7 +51,7 @@ public class LogEvent {
5051
@JsonProperty("audience")
5152
private String audience;
5253
@JsonProperty("scope")
53-
private String scope;
54+
private Object scope;
5455
@JsonProperty("strategy")
5556
private String strategy;
5657
@JsonProperty("strategy_type")
@@ -154,7 +155,7 @@ public String getUserId() {
154155
* @return the scope.
155156
*/
156157
@JsonProperty("scope")
157-
public String getScope() {
158+
public Object getScope() {
158159
return scope;
159160
}
160161

src/test/java/com/auth0/json/mgmt/logevents/LogEventTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import com.auth0.json.JsonTest;
44
import org.junit.jupiter.api.Test;
55

6+
import java.util.Arrays;
7+
68
import static org.hamcrest.MatcherAssert.assertThat;
79
import static org.hamcrest.Matchers.is;
810
import static org.hamcrest.Matchers.notNullValue;
@@ -34,7 +36,8 @@ public class LogEventTest extends JsonTest<LogEvent> {
3436
" \"tenant_name\": \"paid-testing\",\n" +
3537
" \"audience\": \"audience\",\n" +
3638
" \"isMobile\": \"false\",\n" +
37-
" \"user_agent\": \"okhttp 4.11.0 / Other 0.0.0\"\n" +
39+
" \"user_agent\": \"okhttp 4.11.0 / Other 0.0.0\",\n" +
40+
" \"scope\": [\"read:client_grants\", \"create:client_grants\"]\n" +
3841
"}";
3942

4043
@Test
@@ -64,5 +67,6 @@ public void shouldDeserialize() throws Exception {
6467
assertThat(logEvent.getOrganizationName(), is("org2"));
6568
assertThat(logEvent.getTenantName(), is("paid-testing"));
6669
assertThat(logEvent.getEventSchema(), is(notNullValue()));
70+
assertThat(logEvent.getScope(), is(Arrays.asList("read:client_grants", "create:client_grants")));
6771
}
6872
}

0 commit comments

Comments
 (0)