Skip to content

Commit 6cc592a

Browse files
authored
Merge branch 'master' into rate-limits
2 parents 567b31e + 1bbdbcf commit 6cc592a

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

src/main/java/com/auth0/json/mgmt/client/Client.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ public class Client {
3636
private List<String> callbacks;
3737
@JsonProperty("allowed_origins")
3838
private List<String> allowedOrigins;
39+
@JsonProperty("web_origins")
40+
private List<String> webOrigins;
3941
@JsonProperty("client_aliases")
4042
private List<String> clientAliases;
4143
@JsonProperty("allowed_clients")
@@ -261,6 +263,27 @@ public void setAllowedOrigins(List<String> allowedOrigins) {
261263
this.allowedOrigins = allowedOrigins;
262264
}
263265

266+
/**
267+
* Setter for the list of web origins for the application.
268+
*
269+
* @param webOrigins the web origins to set.
270+
*/
271+
@JsonProperty("web_origins")
272+
public void setWebOrigins(List<String> webOrigins) {
273+
this.webOrigins = webOrigins;
274+
}
275+
276+
/**
277+
* Getter for the list of web origins for the application.
278+
*
279+
* @return the list of web origins.
280+
*/
281+
@JsonProperty("web_origins")
282+
public List<String> getWebOrigins() {
283+
return webOrigins;
284+
}
285+
286+
264287
/**
265288
* Getter for the list of application aliases.
266289
*

src/test/java/com/auth0/json/mgmt/client/ClientTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
public class ClientTest extends JsonTest<Client> {
1616

17-
private static final String json = "{\"name\":\"name\",\"description\":\"description\",\"client_secret\":\"secret\",\"app_type\":\"type\",\"logo_uri\":\"uri\",\"oidc_conformant\":true,\"callbacks\":[\"value\"],\"allowed_origins\":[\"value\"],\"client_aliases\":[\"value\"],\"allowed_clients\":[\"value\"],\"allowed_logout_urls\":[\"value\"],\"jwt_configuration\":{\"lifetime_in_seconds\":100,\"scopes\":\"openid\",\"alg\":\"alg\"},\"encryption_key\":{\"pub\":\"pub\",\"cert\":\"cert\"},\"sso\":true,\"sso_disabled\":true,\"custom_login_page_on\":true,\"custom_login_page\":\"custom\",\"custom_login_page_preview\":\"preview\",\"form_template\":\"template\",\"addons\":{\"rms\":{},\"mscrm\":{},\"slack\":{},\"layer\":{}},\"token_endpoint_auth_method\":\"method\",\"client_metadata\":{\"key\":\"value\"},\"mobile\":{\"android\":{\"app_package_name\":\"pkg\",\"sha256_cert_fingerprints\":[\"256\"]},\"ios\":{\"team_id\":\"team\",\"app_bundle_identifier\":\"id\"}}}";
1817
private static final String readOnlyJson = "{\"client_id\":\"clientId\",\"is_first_party\":true,\"is_heroku_app\":true,\"signing_keys\":[{\"cert\":\"ce\",\"pkcs7\":\"pk\",\"subject\":\"su\"}]}";
18+
private static final String json = "{\"name\":\"name\",\"description\":\"description\",\"client_secret\":\"secret\",\"app_type\":\"type\",\"logo_uri\":\"uri\",\"oidc_conformant\":true,\"callbacks\":[\"value\"],\"allowed_origins\":[\"value\"],\"web_origins\":[\"value\"],\"client_aliases\":[\"value\"],\"allowed_clients\":[\"value\"],\"allowed_logout_urls\":[\"value\"],\"jwt_configuration\":{\"lifetime_in_seconds\":100,\"scopes\":\"openid\",\"alg\":\"alg\"},\"encryption_key\":{\"pub\":\"pub\",\"cert\":\"cert\"},\"sso\":true,\"sso_disabled\":true,\"custom_login_page_on\":true,\"custom_login_page\":\"custom\",\"custom_login_page_preview\":\"preview\",\"form_template\":\"template\",\"addons\":{\"rms\":{},\"mscrm\":{},\"slack\":{},\"layer\":{}},\"token_endpoint_auth_method\":\"method\",\"client_metadata\":{\"key\":\"value\"},\"mobile\":{\"android\":{\"app_package_name\":\"pkg\",\"sha256_cert_fingerprints\":[\"256\"]},\"ios\":{\"team_id\":\"team\",\"app_bundle_identifier\":\"id\"}}}";
1919

2020
@Test
2121
public void shouldSerialize() throws Exception {
@@ -30,6 +30,7 @@ public void shouldSerialize() throws Exception {
3030
List<String> stringList = Collections.singletonList("value");
3131
client.setCallbacks(stringList);
3232
client.setAllowedOrigins(stringList);
33+
client.setWebOrigins(stringList);
3334
client.setClientAliases(stringList);
3435
client.setAllowedClients(stringList);
3536
client.setAllowedLogoutUrls(stringList);
@@ -93,6 +94,7 @@ public void shouldDeserialize() throws Exception {
9394
assertThat(client.isOIDCConformant(), is(true));
9495

9596
assertThat(client.getCallbacks(), contains("value"));
97+
assertThat(client.getWebOrigins(), contains("value"));
9698
assertThat(client.getAllowedOrigins(), contains("value"));
9799
assertThat(client.getClientAliases(), contains("value"));
98100
assertThat(client.getAllowedClients(), contains("value"));

0 commit comments

Comments
 (0)