From 5b52cefe64cfb59b92b7e3a009e8217d992335be Mon Sep 17 00:00:00 2001 From: ThaminduDilshan Date: Fri, 6 Oct 2023 15:18:30 +0530 Subject: [PATCH 1/6] Modify client ID tenant unification tests to handle default config enabling --- .../OAuthAppsWithSameClientIdTestCase.java | 27 ++----------- ...alified_url_tenanted_sessions_default.toml | 39 ------------------- ...ified_url_tenanted_sessions_disabled.toml} | 4 +- 3 files changed, 6 insertions(+), 64 deletions(-) delete mode 100644 modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/IS/tenant.qualified/tenant_qualified_url_tenanted_sessions_default.toml rename modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/IS/tenant.qualified/{tenant_qualified_url_tenanted_sessions_enabled.toml => tenant_qualified_url_tenanted_sessions_disabled.toml} (93%) diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuthAppsWithSameClientIdTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuthAppsWithSameClientIdTestCase.java index 26a3dfe7720..f8e8dd5d54c 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuthAppsWithSameClientIdTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuthAppsWithSameClientIdTestCase.java @@ -108,7 +108,6 @@ public class OAuthAppsWithSameClientIdTestCase extends OAuth2ServiceAbstractInte private SCIM2RestClient scim2RestClientTenant2; private HttpClient client; - private boolean configurationsRestored = false; private String tenant1UserId = null; private String tenant2UserId = null; private String sessionDataKey; @@ -121,10 +120,6 @@ private void testInit() throws Exception { super.init(); serverConfigurationManager = new ServerConfigurationManager(isServer); - - // Enable tenant qualified urls/ tenanted sessions and restart the server. - changeISConfigurations(); - tenantMgtRestClient = new TenantMgtRestClient(serverURL, tenantInfo); // Create the test tenants. @@ -159,7 +154,7 @@ private void testInit() throws Exception { @AfterClass(alwaysRun = true) public void testClear() throws IOException, AutomationUtilException { - restoreISConfigurations(); + serverConfigurationManager.restoreToLastConfiguration(true); tenantMgtRestClient.closeHttpClient(); oAuth2RestClientTenant1.closeHttpClient(); oAuth2RestClientTenant2.closeHttpClient(); @@ -388,8 +383,8 @@ public void testOAuthApplicationLoginIncorrectTenant() throws Exception { dependsOnMethods = "testOAuthApplicationLoginIncorrectTenant") public void testOAuthApplicationLoginWhenTenantQualifiedUrlsDisabled() throws Exception { - // Restore the server back to the initial state (tenant qualified urls disabled). - restoreISConfigurations(); + // Disable tenant qualified urls/ tenanted sessions and restart the server. + changeISConfigurations(); // Create oauth app and add user. ApplicationResponseModel tenant1App = createApplication(TENANT_1_DOMAIN); @@ -411,22 +406,8 @@ private void changeISConfigurations() throws AutomationUtilException, IOExceptio File defaultTomlFile = getDeploymentTomlFile(carbonHome); File modifiedConfigFile = new File(getISResourceLocation() + File.separator + "tenant.qualified" + File.separator - + "tenant_qualified_url_tenanted_sessions_enabled.toml"); - serverConfigurationManager.applyConfiguration(modifiedConfigFile, defaultTomlFile, true, true); - } - - private void restoreISConfigurations() throws AutomationUtilException, IOException { - - if (configurationsRestored) { - return; - } - String carbonHome = Utils.getResidentCarbonHome(); - File defaultTomlFile = getDeploymentTomlFile(carbonHome); - File modifiedConfigFile = new File(getISResourceLocation() - + File.separator + "tenant.qualified" + File.separator - + "tenant_qualified_url_tenanted_sessions_default.toml"); + + "tenant_qualified_url_tenanted_sessions_disabled.toml"); serverConfigurationManager.applyConfiguration(modifiedConfigFile, defaultTomlFile, true, true); - configurationsRestored = true; } private void addTenant(String tenantDomain, String adminUsername, String adminPassword, diff --git a/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/IS/tenant.qualified/tenant_qualified_url_tenanted_sessions_default.toml b/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/IS/tenant.qualified/tenant_qualified_url_tenanted_sessions_default.toml deleted file mode 100644 index 2a6ee115a7e..00000000000 --- a/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/IS/tenant.qualified/tenant_qualified_url_tenanted_sessions_default.toml +++ /dev/null @@ -1,39 +0,0 @@ -[server] -hostname = "localhost" -node_ip = "127.0.0.1" -base_path = "https://$ref{server.hostname}:${carbon.management.port}" - -[super_admin] -username = "admin" -password = "admin" -create_admin_account = true - -[user_store] -type = "database_unique_id" - -[database.identity_db] -driver = "$env{IDENTITY_DATABASE_DRIVER}" -url = "$env{IDENTITY_DATABASE_URL}" -username = "$env{IDENTITY_DATABASE_USERNAME}" -password = "$env{IDENTITY_DATABASE_PASSWORD}" - -[database.shared_db] -driver = "$env{SHARED_DATABASE_DRIVER}" -url = "$env{SHARED_DATABASE_URL}" -username = "$env{SHARED_DATABASE_USERNAME}" -password = "$env{SHARED_DATABASE_PASSWORD}" - -[keystore.primary] -file_name = "wso2carbon.jks" -password = "wso2carbon" - -[truststore] -file_name = "client-truststore.jks" -password = "wso2carbon" -type = "JKS" - -[account_recovery.endpoint.auth] -hash = "66cd9688a2ae068244ea01e70f0e230f5623b7fa4cdecb65070a09ec06452262" - -[identity.auth_framework.endpoint] -app_password = "dashboard" diff --git a/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/IS/tenant.qualified/tenant_qualified_url_tenanted_sessions_enabled.toml b/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/IS/tenant.qualified/tenant_qualified_url_tenanted_sessions_disabled.toml similarity index 93% rename from modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/IS/tenant.qualified/tenant_qualified_url_tenanted_sessions_enabled.toml rename to modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/IS/tenant.qualified/tenant_qualified_url_tenanted_sessions_disabled.toml index 8dfe125c8c8..b4a20b941b7 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/IS/tenant.qualified/tenant_qualified_url_tenanted_sessions_enabled.toml +++ b/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/IS/tenant.qualified/tenant_qualified_url_tenanted_sessions_disabled.toml @@ -39,5 +39,5 @@ hash = "66cd9688a2ae068244ea01e70f0e230f5623b7fa4cdecb65070a09ec06452262" app_password = "dashboard" [tenant_context] -enable_tenant_qualified_urls = true -enable_tenanted_sessions = true +enable_tenant_qualified_urls = false +enable_tenanted_sessions = false From 0170e8994d1b96c26c8254f6091fbbdaeccd3f12 Mon Sep 17 00:00:00 2001 From: AnuradhaSK Date: Wed, 25 Oct 2023 01:20:21 +0530 Subject: [PATCH 2/6] fix integration failures due to new attribute in ApplicationResponseModel in application api v1 --- .../v1/model/ApplicationResponseModel.java | 32 +++- .../v1/model/AssociatedRolesConfig.java | 174 ++++++++++++++++++ .../application/management/v1/model/Role.java | 123 +++++++++++++ 3 files changed, 326 insertions(+), 3 deletions(-) create mode 100644 modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/AssociatedRolesConfig.java create mode 100644 modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/Role.java diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/ApplicationResponseModel.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/ApplicationResponseModel.java index ea7862fe14f..d2479e35662 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/ApplicationResponseModel.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/ApplicationResponseModel.java @@ -39,6 +39,8 @@ public class ApplicationResponseModel { private String issuer; private String templateId; private Boolean isManagementApp; + private Boolean isB2BSelfServiceApp; + private AssociatedRolesConfig associatedRoles; private ClaimConfiguration claimConfiguration; private List inboundProtocols = null; private AuthenticationSequence authenticationSequence; @@ -245,6 +247,27 @@ public void setIsManagementApp(Boolean isManagementApp) { this.isManagementApp = isManagementApp; } + /** + * + **/ + public ApplicationResponseModel associatedRoles(AssociatedRolesConfig associatedRoles) { + + this.associatedRoles = associatedRoles; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("associatedRoles") + @Valid + public AssociatedRolesConfig getAssociatedRoles() { + + return associatedRoles; + } + + public void setAssociatedRoles(AssociatedRolesConfig associatedRoles) { + + this.associatedRoles = associatedRoles; + } /** **/ @@ -398,13 +421,15 @@ public boolean equals(Object o) { Objects.equals(this.authenticationSequence, applicationResponseModel.authenticationSequence) && Objects.equals(this.appRoleConfigurations, applicationResponseModel.appRoleConfigurations) && Objects.equals(this.advancedConfigurations, applicationResponseModel.advancedConfigurations) && - Objects.equals(this.provisioningConfigurations, applicationResponseModel.provisioningConfigurations) && - Objects.equals(this.access, applicationResponseModel.access); + Objects.equals(this.provisioningConfigurations, applicationResponseModel.provisioningConfigurations) && Objects.equals(this.access, applicationResponseModel.access) && Objects.equals(this.associatedRoles, applicationResponseModel.associatedRoles); } @Override public int hashCode() { - return Objects.hash(id, name, description, imageUrl, accessUrl, clientId, issuer, templateId, isManagementApp, claimConfiguration, inboundProtocols, authenticationSequence, appRoleConfigurations, advancedConfigurations, provisioningConfigurations, access); + + return Objects.hash(id, name, description, imageUrl, accessUrl, clientId, issuer, templateId, isManagementApp, + claimConfiguration, inboundProtocols, associatedRoles, authenticationSequence, appRoleConfigurations, + advancedConfigurations, provisioningConfigurations, access); } @Override @@ -420,6 +445,7 @@ public String toString() { " issuer: " + toIndentedString(issuer) + "\n" + " templateId: " + toIndentedString(templateId) + "\n" + " isManagementApp: " + toIndentedString(isManagementApp) + "\n" + + " associatedRoles: " + toIndentedString(associatedRoles) + "\n" + " claimConfiguration: " + toIndentedString(claimConfiguration) + "\n" + " inboundProtocols: " + toIndentedString(inboundProtocols) + "\n" + " authenticationSequence: " + toIndentedString(authenticationSequence) + "\n" + diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/AssociatedRolesConfig.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/AssociatedRolesConfig.java new file mode 100644 index 00000000000..67fcb10cd02 --- /dev/null +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/AssociatedRolesConfig.java @@ -0,0 +1,174 @@ +/* + * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.identity.integration.test.rest.api.server.application.management.v1.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + +public class AssociatedRolesConfig { + + @XmlType(name = "AllowedAudienceEnum") + @XmlEnum(String.class) + public enum AllowedAudienceEnum { + + @XmlEnumValue("ORGANIZATION") ORGANIZATION( + String.valueOf("ORGANIZATION")), @XmlEnumValue("APPLICATION") APPLICATION( + String.valueOf("APPLICATION")); + + private String value; + + AllowedAudienceEnum(String v) { + + value = v; + } + + public String value() { + + return value; + } + + @Override + public String toString() { + + return String.valueOf(value); + } + + public static AllowedAudienceEnum fromValue(String value) { + + for (AllowedAudienceEnum b : AllowedAudienceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private AllowedAudienceEnum allowedAudience = AllowedAudienceEnum.ORGANIZATION; + private List roles = null; + + /** + * + **/ + public AssociatedRolesConfig allowedAudience(AllowedAudienceEnum allowedAudience) { + + this.allowedAudience = allowedAudience; + return this; + } + + @ApiModelProperty(example = "ORGANIZATION", required = true, value = "") + @JsonProperty("allowedAudience") + @Valid + @NotNull(message = "Property allowedAudience cannot be null.") + + public AllowedAudienceEnum getAllowedAudience() { + + return allowedAudience; + } + + public void setAllowedAudience(AllowedAudienceEnum allowedAudience) { + + this.allowedAudience = allowedAudience; + } + + /** + * + **/ + public AssociatedRolesConfig roles(List roles) { + + this.roles = roles; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("roles") + @Valid + public List getRoles() { + + return roles; + } + + public void setRoles(List roles) { + + this.roles = roles; + } + + public AssociatedRolesConfig addRolesItem(Role rolesItem) { + + if (this.roles == null) { + this.roles = new ArrayList<>(); + } + this.roles.add(rolesItem); + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssociatedRolesConfig associatedRolesConfig = (AssociatedRolesConfig) o; + return Objects.equals(this.allowedAudience, associatedRolesConfig.allowedAudience) && + Objects.equals(this.roles, associatedRolesConfig.roles); + } + + @Override + public int hashCode() { + + return Objects.hash(allowedAudience, roles); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class AssociatedRolesConfig {\n"); + + sb.append(" allowedAudience: ").append(toIndentedString(allowedAudience)).append("\n"); + sb.append(" roles: ").append(toIndentedString(roles)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/Role.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/Role.java new file mode 100644 index 00000000000..406ebd8bcfe --- /dev/null +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/Role.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.identity.integration.test.rest.api.server.application.management.v1.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Objects; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +public class Role { + + private String id; + private String name; + + /** + * + **/ + public Role id(String id) { + + this.id = id; + return this; + } + + @ApiModelProperty(example = "bf5abd05-3667-4a2a-a6c2-2fb9f4d26e47", required = true, value = "") + @JsonProperty("id") + @Valid + @NotNull(message = "Property id cannot be null.") + + public String getId() { + + return id; + } + + public void setId(String id) { + + this.id = id; + } + + /** + * + **/ + public Role name(String name) { + + this.name = name; + return this; + } + + @ApiModelProperty(example = "RoleA", value = "") + @JsonProperty("name") + @Valid + public String getName() { + + return name; + } + + public void setName(String name) { + + this.name = name; + } + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Role role = (Role) o; + return Objects.equals(this.id, role.id) && + Objects.equals(this.name, role.name); + } + + @Override + public int hashCode() { + + return Objects.hash(id, name); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class Role {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} From 219a5d8e7d61c4078c81b538be4f176cdcdcac5a Mon Sep 17 00:00:00 2001 From: sadilchamishka Date: Wed, 25 Oct 2023 06:55:33 +0530 Subject: [PATCH 3/6] Bump framework & organization management core version --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index c7bb92e1fec..0d000156173 100755 --- a/pom.xml +++ b/pom.xml @@ -2298,7 +2298,7 @@ - 5.25.434 + 5.25.435 [5.14.67, 6.0.0] @@ -2315,7 +2315,7 @@ 5.8.5 5.5.0 5.5.0 - 1.8.25 + 1.8.26 @@ -2405,8 +2405,8 @@ 1.0.14 1.0.0 - 1.3.92 - 1.0.77 + 1.3.93 + 1.0.78 1.1.24 1.1.12 From 682e46fee9809684c10fdea4ccaebbc75095b44e Mon Sep 17 00:00:00 2001 From: sadilchamishka Date: Wed, 25 Oct 2023 08:24:48 +0530 Subject: [PATCH 4/6] Bump organization switch version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0d000156173..cc28050f3c2 100755 --- a/pom.xml +++ b/pom.xml @@ -2408,7 +2408,7 @@ 1.3.93 1.0.78 1.1.24 - 1.1.12 + 1.1.13 0.1.4 From a2c1a3675b21f3ea75c28fded3a9e7b8ff762b7b Mon Sep 17 00:00:00 2001 From: sadilchamishka Date: Wed, 25 Oct 2023 12:29:54 +0530 Subject: [PATCH 5/6] Temorarily disable the organization management integration test --- .../tests-backend/src/test/resources/testng.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/integration/tests-integration/tests-backend/src/test/resources/testng.xml b/modules/integration/tests-integration/tests-backend/src/test/resources/testng.xml index 88cd04b199e..10b178638e4 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/resources/testng.xml +++ b/modules/integration/tests-integration/tests-backend/src/test/resources/testng.xml @@ -361,10 +361,11 @@ - + + From 12e0d028e2633e4a69a269fb7d82c29210e46b22 Mon Sep 17 00:00:00 2001 From: AnuradhaSK Date: Wed, 25 Oct 2023 13:02:16 +0530 Subject: [PATCH 6/6] fix integration failures due to new attribute in ApplicationListItem in application api v1 --- .../v1/model/ApplicationListItem.java | 60 ++++++++++++++----- 1 file changed, 44 insertions(+), 16 deletions(-) diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/ApplicationListItem.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/ApplicationListItem.java index cbc0983a98e..4aaaa3b25b3 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/ApplicationListItem.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/application/management/v1/model/ApplicationListItem.java @@ -1,18 +1,20 @@ /* -* Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright (c) 2019-2023, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.wso2.identity.integration.test.rest.api.server.application.management.v1.model; @@ -66,6 +68,7 @@ public static AccessEnum fromValue(String value) { private AccessEnum access = AccessEnum.READ; private String self; + private AssociatedRolesConfig associatedRoles; /** **/ @@ -212,6 +215,28 @@ public void setClientId(String clientId) { this.clientId = clientId; } + /** + * + **/ + public ApplicationListItem associatedRoles(AssociatedRolesConfig associatedRoles) { + + this.associatedRoles = associatedRoles; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("associatedRoles") + @Valid + public AssociatedRolesConfig getAssociatedRoles() { + + return associatedRoles; + } + + public void setAssociatedRoles(AssociatedRolesConfig associatedRoles) { + + this.associatedRoles = associatedRoles; + } + @Override public boolean equals(java.lang.Object o) { @@ -228,12 +253,14 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.image, applicationListItem.image) && Objects.equals(this.accessUrl, applicationListItem.accessUrl) && Objects.equals(this.access, applicationListItem.access) && - Objects.equals(this.self, applicationListItem.self); + Objects.equals(this.self, applicationListItem.self) && + Objects.equals(this.associatedRoles, applicationListItem.associatedRoles); } @Override public int hashCode() { - return Objects.hash(id, name, description, image, accessUrl, access, self); + + return Objects.hash(id, name, description, image, accessUrl, access, self, associatedRoles); } @Override @@ -249,6 +276,7 @@ public String toString() { sb.append(" accessUrl: ").append(toIndentedString(accessUrl)).append("\n"); sb.append(" access: ").append(toIndentedString(access)).append("\n"); sb.append(" self: ").append(toIndentedString(self)).append("\n"); + sb.append(" associatedRoles: ").append(toIndentedString(associatedRoles)).append("\n"); sb.append("}"); return sb.toString(); }