File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
main/java/com/auth0/json/mgmt/logevents
test/java/com/auth0/json/mgmt/logevents Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 66import com .fasterxml .jackson .annotation .JsonProperty ;
77
88import java .util .Date ;
9+ import java .util .List ;
910import 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
Original file line number Diff line number Diff line change 33import com .auth0 .json .JsonTest ;
44import org .junit .jupiter .api .Test ;
55
6+ import java .util .Arrays ;
7+
68import static org .hamcrest .MatcherAssert .assertThat ;
79import static org .hamcrest .Matchers .is ;
810import 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}
You can’t perform that action at this time.
0 commit comments