From ff6a48073a61442da0d0a0d152fed74988cf6fae Mon Sep 17 00:00:00 2001 From: vimukthiRajapaksha Date: Mon, 26 Aug 2024 09:44:00 +0530 Subject: [PATCH 01/13] Adds Authorization Details Types API --- .../pom.xml | 1 + .../APIResourceManagementServiceHolder.java | 25 +- ...ationDetailsTypeMgtOSGiServiceFactory.java | 51 +++ .../pom.xml | 2 + .../resource/v1/APIResourceCreationModel.java | 37 +- .../resource/v1/APIResourcePatchModel.java | 37 +- .../api/resource/v1/APIResourceResponse.java | 35 +- .../api/resource/v1/ApiResourcesApi.java | 133 +++++- .../resource/v1/ApiResourcesApiService.java | 14 +- .../v1/AuthorizationDetailsTypesApi.java | 69 +++ .../AuthorizationDetailsTypesApiService.java | 35 ++ ...uthorizationDetailsTypesCreationModel.java | 185 ++++++++ ...izationDetailsTypesCreationModelAllOf.java | 101 +++++ .../v1/AuthorizationDetailsTypesGetModel.java | 209 +++++++++ ...uthorizationDetailsTypesGetModelAllOf.java | 101 +++++ .../AuthorizationDetailsTypesPatchModel.java | 159 +++++++ .../api/resource/v1/InlineResponse200.java | 98 +++++ ...rizationDetailsTypesApiServiceFactory.java | 32 ++ .../APIResourceMgtEndpointConstants.java | 5 +- ...orizationDetailsTypeManagementService.java | 135 ++++++ .../v1/impl/ApiResourcesApiServiceImpl.java | 52 ++- ...thorizationDetailsTypesApiServiceImpl.java | 35 ++ .../util/AuthorizationDetailsTypeMgtUtil.java | 79 ++++ .../src/main/resources/APIResources.yaml | 396 ++++++++++++++++++ .../cxf/api-resource-server-v1-cxf.xml | 8 +- 25 files changed, 2020 insertions(+), 14 deletions(-) create mode 100644 components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/factory/AuthorizationDetailsTypeMgtOSGiServiceFactory.java create mode 100644 components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesApi.java create mode 100644 components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesApiService.java create mode 100644 components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesCreationModel.java create mode 100644 components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesCreationModelAllOf.java create mode 100644 components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesGetModel.java create mode 100644 components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesGetModelAllOf.java create mode 100644 components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesPatchModel.java create mode 100644 components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/InlineResponse200.java create mode 100644 components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypesApiServiceFactory.java create mode 100644 components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java create mode 100644 components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/AuthorizationDetailsTypesApiServiceImpl.java create mode 100644 components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/pom.xml b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/pom.xml index b582d84b6b..70137ef6c0 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/pom.xml @@ -61,6 +61,7 @@ org.wso2.carbon.identity.framework org.wso2.carbon.identity.api.resource.mgt + 7.3.75-SNAPSHOT provided diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/APIResourceManagementServiceHolder.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/APIResourceManagementServiceHolder.java index 005b76a655..ea66113d05 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/APIResourceManagementServiceHolder.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/APIResourceManagementServiceHolder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2023-2024, 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 @@ -20,6 +20,7 @@ import org.wso2.carbon.identity.api.resource.collection.mgt.APIResourceCollectionManager; import org.wso2.carbon.identity.api.resource.mgt.APIResourceManager; +import org.wso2.carbon.identity.api.resource.mgt.AuthorizationDetailsTypeManager; import org.wso2.carbon.identity.oauth.OAuthAdminServiceImpl; /** @@ -30,6 +31,7 @@ public class APIResourceManagementServiceHolder { private static APIResourceManager apiResourceManager; private static APIResourceCollectionManager apiResourceCollectionManager; private static OAuthAdminServiceImpl oAuthAdminServiceImpl; + private static AuthorizationDetailsTypeManager authorizationDetailsTypeManager; /** * Get APIResourceManager osgi service. @@ -90,4 +92,25 @@ public static void setOAuthAdminServiceImpl(OAuthAdminServiceImpl oAuthAdminServ APIResourceManagementServiceHolder.oAuthAdminServiceImpl = oAuthAdminServiceImpl; } + + /** + * Set {@link AuthorizationDetailsTypeManager} instance. + * + * @return AuthorizationDetailsTypeManager instance. + */ + public static AuthorizationDetailsTypeManager getAuthorizationDetailsTypeManager() { + + return authorizationDetailsTypeManager; + } + + /** + * Set {@link AuthorizationDetailsTypeManager} instance. + * + * @param authorizationDetailsTypeManager AuthorizationDetailsTypeManager instance. + */ + public static void setAuthorizationDetailsTypeManager( + AuthorizationDetailsTypeManager authorizationDetailsTypeManager) { + + APIResourceManagementServiceHolder.authorizationDetailsTypeManager = authorizationDetailsTypeManager; + } } diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/factory/AuthorizationDetailsTypeMgtOSGiServiceFactory.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/factory/AuthorizationDetailsTypeMgtOSGiServiceFactory.java new file mode 100644 index 0000000000..c3a5b71100 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/factory/AuthorizationDetailsTypeMgtOSGiServiceFactory.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2024, 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.carbon.identity.api.server.api.resource.common.factory; + +import org.springframework.beans.factory.config.AbstractFactoryBean; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.identity.api.resource.mgt.AuthorizationDetailsTypeManager; + +/** + * Factory class for {@link AuthorizationDetailsTypeManager}. + */ +public class AuthorizationDetailsTypeMgtOSGiServiceFactory extends + AbstractFactoryBean { + + private AuthorizationDetailsTypeManager authorizationDetailsTypeManager; + + @Override + public Class getObjectType() { + + return Object.class; + } + + @Override + protected AuthorizationDetailsTypeManager createInstance() throws Exception { + + if (this.authorizationDetailsTypeManager == null) { + this.authorizationDetailsTypeManager = (AuthorizationDetailsTypeManager) PrivilegedCarbonContext. + getThreadLocalCarbonContext().getOSGiService(AuthorizationDetailsTypeManager.class, null); + if (this.authorizationDetailsTypeManager == null) { + throw new Exception("Unable to retrieve AuthorizationDetailsTypeManager service."); + } + } + return this.authorizationDetailsTypeManager; + } +} diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/pom.xml index 89a395ce1d..bef29f264c 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/pom.xml @@ -95,6 +95,7 @@ org.wso2.carbon.identity.framework org.wso2.carbon.identity.api.resource.mgt + 7.3.75-SNAPSHOT provided @@ -118,6 +119,7 @@ org.wso2.carbon.identity.framework org.wso2.carbon.identity.application.common + 7.3.75-SNAPSHOT provided diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourceCreationModel.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourceCreationModel.java index 3e60430092..a0c01d3187 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourceCreationModel.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourceCreationModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2024, 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 @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; +import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesGetModel; import org.wso2.carbon.identity.api.server.api.resource.v1.ScopeCreationModel; import javax.validation.constraints.*; @@ -41,6 +42,8 @@ public class APIResourceCreationModel { private Boolean requiresAuthorization; private List scopes = null; + private List authorizationDetailsTypes = null; + /** **/ @@ -144,6 +147,32 @@ public APIResourceCreationModel addScopesItem(ScopeCreationModel scopesItem) { return this; } + /** + **/ + public APIResourceCreationModel authorizationDetailsTypes(List authorizationDetailsTypes) { + + this.authorizationDetailsTypes = authorizationDetailsTypes; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("authorizationDetailsTypes") + @Valid + public List getAuthorizationDetailsTypes() { + return authorizationDetailsTypes; + } + public void setAuthorizationDetailsTypes(List authorizationDetailsTypes) { + this.authorizationDetailsTypes = authorizationDetailsTypes; + } + + public APIResourceCreationModel addAuthorizationDetailsTypesItem(AuthorizationDetailsTypesGetModel authorizationDetailsTypesItem) { + if (this.authorizationDetailsTypes == null) { + this.authorizationDetailsTypes = new ArrayList(); + } + this.authorizationDetailsTypes.add(authorizationDetailsTypesItem); + return this; + } + @Override @@ -160,12 +189,13 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.identifier, apIResourceCreationModel.identifier) && Objects.equals(this.description, apIResourceCreationModel.description) && Objects.equals(this.requiresAuthorization, apIResourceCreationModel.requiresAuthorization) && - Objects.equals(this.scopes, apIResourceCreationModel.scopes); + Objects.equals(this.scopes, apIResourceCreationModel.scopes) && + Objects.equals(this.authorizationDetailsTypes, apIResourceCreationModel.authorizationDetailsTypes); } @Override public int hashCode() { - return Objects.hash(name, identifier, description, requiresAuthorization, scopes); + return Objects.hash(name, identifier, description, requiresAuthorization, scopes, authorizationDetailsTypes); } @Override @@ -179,6 +209,7 @@ public String toString() { sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" requiresAuthorization: ").append(toIndentedString(requiresAuthorization)).append("\n"); sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n"); + sb.append(" authorizationDetailsTypes: ").append(toIndentedString(authorizationDetailsTypes)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourcePatchModel.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourcePatchModel.java index ba00307b2e..e41dbc2061 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourcePatchModel.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourcePatchModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2024, 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 @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; +import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesGetModel; import org.wso2.carbon.identity.api.server.api.resource.v1.ScopeCreationModel; import javax.validation.constraints.*; @@ -41,6 +42,8 @@ public class APIResourcePatchModel { private List removedScopes = null; + private List authorizationDetailsTypes = null; + /** **/ @@ -131,6 +134,32 @@ public APIResourcePatchModel addRemovedScopesItem(String removedScopesItem) { return this; } + /** + **/ + public APIResourcePatchModel authorizationDetailsTypes(List authorizationDetailsTypes) { + + this.authorizationDetailsTypes = authorizationDetailsTypes; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("authorizationDetailsTypes") + @Valid + public List getAuthorizationDetailsTypes() { + return authorizationDetailsTypes; + } + public void setAuthorizationDetailsTypes(List authorizationDetailsTypes) { + this.authorizationDetailsTypes = authorizationDetailsTypes; + } + + public APIResourcePatchModel addAuthorizationDetailsTypesItem(AuthorizationDetailsTypesGetModel authorizationDetailsTypesItem) { + if (this.authorizationDetailsTypes == null) { + this.authorizationDetailsTypes = new ArrayList(); + } + this.authorizationDetailsTypes.add(authorizationDetailsTypesItem); + return this; + } + @Override @@ -146,12 +175,13 @@ public boolean equals(java.lang.Object o) { return Objects.equals(this.name, apIResourcePatchModel.name) && Objects.equals(this.description, apIResourcePatchModel.description) && Objects.equals(this.addedScopes, apIResourcePatchModel.addedScopes) && - Objects.equals(this.removedScopes, apIResourcePatchModel.removedScopes); + Objects.equals(this.removedScopes, apIResourcePatchModel.removedScopes) && + Objects.equals(this.authorizationDetailsTypes, apIResourcePatchModel.authorizationDetailsTypes); } @Override public int hashCode() { - return Objects.hash(name, description, addedScopes, removedScopes); + return Objects.hash(name, description, addedScopes, removedScopes, authorizationDetailsTypes); } @Override @@ -164,6 +194,7 @@ public String toString() { sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" addedScopes: ").append(toIndentedString(addedScopes)).append("\n"); sb.append(" removedScopes: ").append(toIndentedString(removedScopes)).append("\n"); + sb.append(" authorizationDetailsTypes: ").append(toIndentedString(authorizationDetailsTypes)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourceResponse.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourceResponse.java index a2c360f259..a57fd7dac9 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourceResponse.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourceResponse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2024, 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 @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; +import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesGetModel; import org.wso2.carbon.identity.api.server.api.resource.v1.Property; import org.wso2.carbon.identity.api.server.api.resource.v1.ScopeGetModel; import org.wso2.carbon.identity.api.server.api.resource.v1.SubscribedApplicationGetModel; @@ -45,6 +46,8 @@ public class APIResourceResponse { private Boolean requiresAuthorization; private List scopes = null; + private List authorizationDetailsTypes = null; + private List subscribedApplications = null; private List properties = null; @@ -193,6 +196,32 @@ public APIResourceResponse addScopesItem(ScopeGetModel scopesItem) { /** **/ + public APIResourceResponse authorizationDetailsTypes(List authorizationDetailsTypes) { + + this.authorizationDetailsTypes = authorizationDetailsTypes; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("authorizationDetailsTypes") + @Valid + public List getAuthorizationDetailsTypes() { + return authorizationDetailsTypes; + } + public void setAuthorizationDetailsTypes(List authorizationDetailsTypes) { + this.authorizationDetailsTypes = authorizationDetailsTypes; + } + + public APIResourceResponse addAuthorizationDetailsTypesItem(AuthorizationDetailsTypesGetModel authorizationDetailsTypesItem) { + if (this.authorizationDetailsTypes == null) { + this.authorizationDetailsTypes = new ArrayList(); + } + this.authorizationDetailsTypes.add(authorizationDetailsTypesItem); + return this; + } + + /** + **/ public APIResourceResponse subscribedApplications(List subscribedApplications) { this.subscribedApplications = subscribedApplications; @@ -282,6 +311,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.type, apIResourceResponse.type) && Objects.equals(this.requiresAuthorization, apIResourceResponse.requiresAuthorization) && Objects.equals(this.scopes, apIResourceResponse.scopes) && + Objects.equals(this.authorizationDetailsTypes, apIResourceResponse.authorizationDetailsTypes) && Objects.equals(this.subscribedApplications, apIResourceResponse.subscribedApplications) && Objects.equals(this.properties, apIResourceResponse.properties) && Objects.equals(this.self, apIResourceResponse.self); @@ -289,7 +319,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(id, name, description, identifier, type, requiresAuthorization, scopes, subscribedApplications, properties, self); + return Objects.hash(id, name, description, identifier, type, requiresAuthorization, scopes, authorizationDetailsTypes, subscribedApplications, properties, self); } @Override @@ -305,6 +335,7 @@ public String toString() { sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" requiresAuthorization: ").append(toIndentedString(requiresAuthorization)).append("\n"); sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n"); + sb.append(" authorizationDetailsTypes: ").append(toIndentedString(authorizationDetailsTypes)).append("\n"); sb.append(" subscribedApplications: ").append(toIndentedString(subscribedApplications)).append("\n"); sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); sb.append(" self: ").append(toIndentedString(self)).append("\n"); diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApi.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApi.java index e6befc4bc3..f1df733ae5 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApi.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2024, 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 @@ -260,4 +260,135 @@ public Response getAPIResources( @Valid@ApiParam(value = "Base64 encoded curs return delegate.getAPIResources(before, after, filter, limit, attributes ); } + @Valid + @PUT + @Path("/{apiResourceId}/authorization-details-types") + @Consumes({ "application/json" }) + @Produces({ "application/json" }) + @ApiOperation(value = "Adds new authorization details types to the API resource", notes = "This API is used to add a new authorization details type to API resource. Permission required: * /permission/admin/manage/identity/apiresourcemgt/update Scope required: * internal_api_resource_update ", response = Void.class, authorizations = { + @Authorization(value = "BasicAuth"), + @Authorization(value = "OAuth2", scopes = { + + }) + }, tags={ "API Resource Authorization Details Types", }) + @ApiResponses(value = { + @ApiResponse(code = 204, message = "No Content", response = Void.class), + @ApiResponse(code = 401, message = "Unauthorized request", response = Error.class), + @ApiResponse(code = 404, message = "Requested resource is not found", response = Error.class), + @ApiResponse(code = 500, message = "Encountered a server error", response = Error.class) + }) + public Response addsAuthorizationDetailsTypes(@ApiParam(value = "ID of the API Resource.",required=true) @PathParam("apiResourceId") String apiResourceId, @ApiParam(value = "" ) @Valid List authorizationDetailsTypesPatchModel) { + + return delegate.addsAuthorizationDetailsTypes(apiResourceId, authorizationDetailsTypesPatchModel ); + } + + @Valid + @DELETE + @Path("/{apiResourceId}/authorization-details-types/{authorizationDetailsType}") + + @Produces({ "application/json" }) + @ApiOperation(value = "Deletes a registered authorization details type by type", notes = "This API is used to delete a registered authorization details type by a given type. Permission required: * /permission/admin/manage/identity/apiresourcemgt/delete Scope required: * internal_api_resource_delete ", response = Void.class, authorizations = { + @Authorization(value = "BasicAuth"), + @Authorization(value = "OAuth2", scopes = { + + }) + }, tags={ "API Resource Authorization Details Types", }) + @ApiResponses(value = { + @ApiResponse(code = 204, message = "Successfully deleted an authorization details type by type", response = Void.class), + @ApiResponse(code = 401, message = "Unauthorized request", response = Error.class), + @ApiResponse(code = 500, message = "Encountered a server error", response = Error.class) + }) + public Response deleteAnAuthorizationDetailsType(@ApiParam(value = "ID of the API Resource.",required=true) @PathParam("apiResourceId") String apiResourceId, @ApiParam(value = "Type of the authorization details type that is to be retrieved",required=true) @PathParam("authorizationDetailsType") String authorizationDetailsType) { + + return delegate.deleteAnAuthorizationDetailsType(apiResourceId, authorizationDetailsType ); + } + + @Valid + @GET + @Path("/{apiResourceId}/authorization-details-types/{authorizationDetailsType}") + + @Produces({ "application/json" }) + @ApiOperation(value = "Returns a registered authorization details type by type", notes = "This API is used to retrieve details of a registered authorization details type by a given type. Permission required: * /permission/admin/manage/identity/apiresourcemgt/view Scope required: * internal_api_resource_view ", response = AuthorizationDetailsTypesGetModel.class, authorizations = { + @Authorization(value = "BasicAuth"), + @Authorization(value = "OAuth2", scopes = { + + }) + }, tags={ "API Resource Authorization Details Types", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Successfully retrieved an authorization details type by type", response = AuthorizationDetailsTypesGetModel.class), + @ApiResponse(code = 401, message = "Unauthorized request", response = Error.class), + @ApiResponse(code = 404, message = "Requested resource is not found", response = Error.class), + @ApiResponse(code = 500, message = "Encountered a server error", response = Error.class) + }) + public Response getAnAuthorizationDetailsType(@ApiParam(value = "ID of the API Resource.",required=true) @PathParam("apiResourceId") String apiResourceId, @ApiParam(value = "Type of the authorization details type that is to be retrieved",required=true) @PathParam("authorizationDetailsType") String authorizationDetailsType) { + + return delegate.getAnAuthorizationDetailsType(apiResourceId, authorizationDetailsType ); + } + + @Valid + @GET + @Path("/{apiResourceId}/authorization-details-types") + + @Produces({ "application/json" }) + @ApiOperation(value = "Lists all registered authorization details types", notes = "This API is used to get all registered authorization details types. Permission required: * /permission/admin/manage/identity/apiresourcemgt/view Scope required: * internal_api_resource_view ", response = AuthorizationDetailsTypesGetModel.class, responseContainer = "List", authorizations = { + @Authorization(value = "BasicAuth"), + @Authorization(value = "OAuth2", scopes = { + + }) + }, tags={ "API Resource Authorization Details Types", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Successfully retrieved a list of authorization details types", response = AuthorizationDetailsTypesGetModel.class, responseContainer = "List"), + @ApiResponse(code = 401, message = "Unauthorized request", response = Error.class), + @ApiResponse(code = 404, message = "Requested resource is not found", response = Error.class), + @ApiResponse(code = 500, message = "Encountered a server error", response = Error.class) + }) + public Response getAuthorizationDetailsType(@ApiParam(value = "ID of the API Resource.",required=true) @PathParam("apiResourceId") String apiResourceId) { + + return delegate.getAuthorizationDetailsType(apiResourceId ); + } + + @Valid + @HEAD + @Path("/{apiResourceId}/authorization-details-types/{authorizationDetailsType}") + + @Produces({ "application/json" }) + @ApiOperation(value = "Checks an authorization details type existence by type", notes = "This API is used to check a registered authorization details type's existence using a given type. Permission required: * /permission/admin/manage/identity/apiresourcemgt/view Scope required: * internal_api_resource_view ", response = InlineResponse200.class, authorizations = { + @Authorization(value = "BasicAuth"), + @Authorization(value = "OAuth2", scopes = { + + }) + }, tags={ "API Resource Authorization Details Types", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Provided authorization details type exists", response = InlineResponse200.class), + @ApiResponse(code = 401, message = "Unauthorized request", response = Error.class), + @ApiResponse(code = 404, message = "Requested resource is not found", response = Error.class), + @ApiResponse(code = 500, message = "Encountered a server error", response = Error.class) + }) + public Response isAuthorizationDetailsTypeExists(@ApiParam(value = "ID of the API Resource.",required=true) @PathParam("apiResourceId") String apiResourceId, @ApiParam(value = "Type of the authorization details type that is to be retrieved",required=true) @PathParam("authorizationDetailsType") String authorizationDetailsType) { + + return delegate.isAuthorizationDetailsTypeExists(apiResourceId, authorizationDetailsType ); + } + + @Valid + @PATCH + @Path("/{apiResourceId}/authorization-details-types/{authorizationDetailsType}") + @Consumes({ "application/json" }) + @Produces({ "application/json" }) + @ApiOperation(value = "Updates a registered authorization details type by type", notes = "This API is used to update a registered authorization details type by a given type. Permission required: * /permission/admin/manage/identity/apiresourcemgt/update Scope required: * internal_api_resource_update ", response = AuthorizationDetailsTypesGetModel.class, authorizations = { + @Authorization(value = "BasicAuth"), + @Authorization(value = "OAuth2", scopes = { + + }) + }, tags={ "API Resource Authorization Details Types" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Successfully updated an authorization details type by type", response = AuthorizationDetailsTypesGetModel.class), + @ApiResponse(code = 401, message = "Unauthorized request", response = Error.class), + @ApiResponse(code = 404, message = "Requested resource is not found", response = Error.class), + @ApiResponse(code = 500, message = "Encountered a server error", response = Error.class) + }) + public Response updateAnAuthorizationDetailsType(@ApiParam(value = "ID of the API Resource.",required=true) @PathParam("apiResourceId") String apiResourceId, @ApiParam(value = "Type of the authorization details type that is to be retrieved",required=true) @PathParam("authorizationDetailsType") String authorizationDetailsType, @ApiParam(value = "" ) @Valid AuthorizationDetailsTypesPatchModel authorizationDetailsTypesPatchModel) { + + return delegate.updateAnAuthorizationDetailsType(apiResourceId, authorizationDetailsType, authorizationDetailsTypesPatchModel ); + } + } diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApiService.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApiService.java index 0e6e0e817b..240512ec69 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApiService.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApiService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2024, 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 @@ -54,4 +54,16 @@ public interface ApiResourcesApiService { public Response apiResourcesApiResourceIdScopesScopeNamePatch(String apiResourceId, String scopeName, ScopePatchModel scopePatchModel); public Response getAPIResources(String before, String after, String filter, Integer limit, String attributes); + + public Response addsAuthorizationDetailsTypes(String apiResourceId, List authorizationDetailsTypesPatchModel); + + public Response deleteAnAuthorizationDetailsType(String apiResourceId, String authorizationDetailsType); + + public Response getAnAuthorizationDetailsType(String apiResourceId, String authorizationDetailsType); + + public Response getAuthorizationDetailsType(String apiResourceId); + + public Response isAuthorizationDetailsTypeExists(String apiResourceId, String authorizationDetailsType); + + public Response updateAnAuthorizationDetailsType(String apiResourceId, String authorizationDetailsType, AuthorizationDetailsTypesPatchModel authorizationDetailsTypesPatchModel); } diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesApi.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesApi.java new file mode 100644 index 0000000000..467fc59c07 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesApi.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2024, 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.carbon.identity.api.server.api.resource.v1; + +import org.springframework.beans.factory.annotation.Autowired; +import org.apache.cxf.jaxrs.ext.multipart.Attachment; +import org.apache.cxf.jaxrs.ext.multipart.Multipart; +import java.io.InputStream; +import java.util.List; + +import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesGetModel; +import org.wso2.carbon.identity.api.server.api.resource.v1.Error; +import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesApiService; + +import javax.validation.Valid; +import javax.ws.rs.*; +import javax.ws.rs.core.Response; +import io.swagger.annotations.*; + +import javax.validation.constraints.*; + +@Path("/authorization-details-types") +@Api(description = "The authorization-details-types API") + +public class AuthorizationDetailsTypesApi { + + @Autowired + private AuthorizationDetailsTypesApiService delegate; + + @Valid + @GET + + + @Produces({ "application/json" }) + @ApiOperation(value = "Gets all authorization details types in the tenant", notes = "Get all authorization details types in the tenant Permission required:
* /permission/admin/manage/identity/apiresourcemgt/view
Scope required:
* internal_api_resource_view ", response = AuthorizationDetailsTypesGetModel.class, responseContainer = "List", authorizations = { + @Authorization(value = "BasicAuth"), + @Authorization(value = "OAuth2", scopes = { + + }) + }, tags={ "API Resource Authorization Details Types" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "OK", response = AuthorizationDetailsTypesGetModel.class, responseContainer = "List"), + @ApiResponse(code = 401, message = "Unauthorized", response = Void.class), + @ApiResponse(code = 403, message = "Forbidden", response = Void.class), + @ApiResponse(code = 404, message = "Not Found", response = Error.class), + @ApiResponse(code = 500, message = "Server Error", response = Error.class) + }) + public Response authorizationDetailsTypesGet( @Valid@ApiParam(value = "Condition to filter the retrieval of records. Supports 'sw', 'co', 'ew' and 'eq' operations. ") @QueryParam("filter") String filter) { + + return delegate.authorizationDetailsTypesGet(filter ); + } + +} diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesApiService.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesApiService.java new file mode 100644 index 0000000000..ef97f18653 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesApiService.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2024, 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.carbon.identity.api.server.api.resource.v1; + +import org.wso2.carbon.identity.api.server.api.resource.v1.*; +import org.wso2.carbon.identity.api.server.api.resource.v1.*; +import org.apache.cxf.jaxrs.ext.multipart.Attachment; +import org.apache.cxf.jaxrs.ext.multipart.Multipart; +import java.io.InputStream; +import java.util.List; +import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesGetModel; +import org.wso2.carbon.identity.api.server.api.resource.v1.Error; +import javax.ws.rs.core.Response; + + +public interface AuthorizationDetailsTypesApiService { + + public Response authorizationDetailsTypesGet(String filter); +} diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesCreationModel.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesCreationModel.java new file mode 100644 index 0000000000..348908a28a --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesCreationModel.java @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2024, 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.carbon.identity.api.server.api.resource.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesCreationModelAllOf; +import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesPatchModel; +import javax.validation.constraints.*; + + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; + +public class AuthorizationDetailsTypesCreationModel { + + private String type; + private String name; + private String description; + private Map schema = new HashMap(); + + + /** + * an unique type of the authorization details type + **/ + public AuthorizationDetailsTypesCreationModel type(String type) { + + this.type = type; + return this; + } + + @ApiModelProperty(example = "payment_initiation", required = true, value = "an unique type of the authorization details type") + @JsonProperty("type") + @Valid + @NotNull(message = "Property type cannot be null.") + @Size(min=1,max=255) + public String getType() { + return type; + } + public void setType(String type) { + this.type = type; + } + + /** + * display name of the authorization details type + **/ + public AuthorizationDetailsTypesCreationModel name(String name) { + + this.name = name; + return this; + } + + @ApiModelProperty(example = "Payment Initiation", required = true, value = "display name of the authorization details type") + @JsonProperty("name") + @Valid + @NotNull(message = "Property name cannot be null.") + @Size(min=3,max=255) + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + /** + * description of the authorization details type + **/ + public AuthorizationDetailsTypesCreationModel description(String description) { + + this.description = description; + return this; + } + + @ApiModelProperty(example = "Payment initiation authorization details type", required = true, value = "description of the authorization details type") + @JsonProperty("description") + @Valid + @NotNull(message = "Property description cannot be null.") + + public String getDescription() { + return description; + } + public void setDescription(String description) { + this.description = description; + } + + /** + * Accepts the [JSON Schema document](https://json-schema.org/draft/2020-12/json-schema-core#name-json-schema-documents) of the authorization details type + **/ + public AuthorizationDetailsTypesCreationModel schema(Map schema) { + + this.schema = schema; + return this; + } + + @ApiModelProperty(example = "{\"type\":\"object\",\"required\":[\"type\",\"actions\",\"locations\",\"instructedAmount\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"payment_initiation\"]},\"actions\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"initiate\",\"cancel\"]}},\"locations\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"format\":\"uri\"}},\"instructedAmount\":{\"type\":\"object\",\"properties\":{\"currency\":{\"type\":\"string\",\"minLength\":3},\"amount\":{\"type\":\"string\"}}},\"creditorName\":\"string\",\"creditorAccount\":{\"type\":\"object\"}}}", required = true, value = "Accepts the [JSON Schema document](https://json-schema.org/draft/2020-12/json-schema-core#name-json-schema-documents) of the authorization details type") + @JsonProperty("schema") + @Valid + @NotNull(message = "Property schema cannot be null.") + + public Map getSchema() { + return schema; + } + public void setSchema(Map schema) { + this.schema = schema; + } + + + public AuthorizationDetailsTypesCreationModel putSchemaItem(String key, Object schemaItem) { + this.schema.put(key, schemaItem); + return this; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthorizationDetailsTypesCreationModel authorizationDetailsTypesCreationModel = (AuthorizationDetailsTypesCreationModel) o; + return Objects.equals(this.type, authorizationDetailsTypesCreationModel.type) && + Objects.equals(this.name, authorizationDetailsTypesCreationModel.name) && + Objects.equals(this.description, authorizationDetailsTypesCreationModel.description) && + Objects.equals(this.schema, authorizationDetailsTypesCreationModel.schema); + } + + @Override + public int hashCode() { + return Objects.hash(type, name, description, schema); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorizationDetailsTypesCreationModel {\n"); + + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" schema: ").append(toIndentedString(schema)).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/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesCreationModelAllOf.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesCreationModelAllOf.java new file mode 100644 index 0000000000..13f88e1e9f --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesCreationModelAllOf.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2024, 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.carbon.identity.api.server.api.resource.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.*; + + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; + +public class AuthorizationDetailsTypesCreationModelAllOf { + + private String type; + + /** + * an unique type of the authorization details type + **/ + public AuthorizationDetailsTypesCreationModelAllOf type(String type) { + + this.type = type; + return this; + } + + @ApiModelProperty(example = "payment_initiation", required = true, value = "an unique type of the authorization details type") + @JsonProperty("type") + @Valid + @NotNull(message = "Property type cannot be null.") + @Size(min=1,max=255) + public String getType() { + return type; + } + public void setType(String type) { + this.type = type; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthorizationDetailsTypesCreationModelAllOf authorizationDetailsTypesCreationModelAllOf = (AuthorizationDetailsTypesCreationModelAllOf) o; + return Objects.equals(this.type, authorizationDetailsTypesCreationModelAllOf.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorizationDetailsTypesCreationModelAllOf {\n"); + + sb.append(" type: ").append(toIndentedString(type)).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/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesGetModel.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesGetModel.java new file mode 100644 index 0000000000..b71e9718f9 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesGetModel.java @@ -0,0 +1,209 @@ +/* + * Copyright (c) 2024, 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.carbon.identity.api.server.api.resource.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesCreationModel; +import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesGetModelAllOf; +import javax.validation.constraints.*; + + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; + +public class AuthorizationDetailsTypesGetModel { + + private String id; + private String type; + private String name; + private String description; + private Map schema = new HashMap(); + + + /** + * an unique id of the registered authorization details type + **/ + public AuthorizationDetailsTypesGetModel id(String id) { + + this.id = id; + return this; + } + + @ApiModelProperty(example = "a9403470-dd11-46b4-8db9-aaa31f1d4423", required = true, value = "an unique id of the registered authorization details type") + @JsonProperty("id") + @Valid + @NotNull(message = "Property id cannot be null.") + @Size(min=36,max=36) + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + + /** + * an unique type of the authorization details type + **/ + public AuthorizationDetailsTypesGetModel type(String type) { + + this.type = type; + return this; + } + + @ApiModelProperty(example = "payment_initiation", required = true, value = "an unique type of the authorization details type") + @JsonProperty("type") + @Valid + @NotNull(message = "Property type cannot be null.") + @Size(min=1,max=255) + public String getType() { + return type; + } + public void setType(String type) { + this.type = type; + } + + /** + * display name of the authorization details type + **/ + public AuthorizationDetailsTypesGetModel name(String name) { + + this.name = name; + return this; + } + + @ApiModelProperty(example = "Payment Initiation", required = true, value = "display name of the authorization details type") + @JsonProperty("name") + @Valid + @NotNull(message = "Property name cannot be null.") + @Size(min=3,max=255) + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + /** + * description of the authorization details type + **/ + public AuthorizationDetailsTypesGetModel description(String description) { + + this.description = description; + return this; + } + + @ApiModelProperty(example = "Payment initiation authorization details type", required = true, value = "description of the authorization details type") + @JsonProperty("description") + @Valid + @NotNull(message = "Property description cannot be null.") + + public String getDescription() { + return description; + } + public void setDescription(String description) { + this.description = description; + } + + /** + * Accepts the [JSON Schema document](https://json-schema.org/draft/2020-12/json-schema-core#name-json-schema-documents) of the authorization details type + **/ + public AuthorizationDetailsTypesGetModel schema(Map schema) { + + this.schema = schema; + return this; + } + + @ApiModelProperty(example = "{\"type\":\"object\",\"required\":[\"type\",\"actions\",\"locations\",\"instructedAmount\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"payment_initiation\"]},\"actions\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"initiate\",\"cancel\"]}},\"locations\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"format\":\"uri\"}},\"instructedAmount\":{\"type\":\"object\",\"properties\":{\"currency\":{\"type\":\"string\",\"minLength\":3},\"amount\":{\"type\":\"string\"}}},\"creditorName\":\"string\",\"creditorAccount\":{\"type\":\"object\"}}}", required = true, value = "Accepts the [JSON Schema document](https://json-schema.org/draft/2020-12/json-schema-core#name-json-schema-documents) of the authorization details type") + @JsonProperty("schema") + @Valid + @NotNull(message = "Property schema cannot be null.") + + public Map getSchema() { + return schema; + } + public void setSchema(Map schema) { + this.schema = schema; + } + + + public AuthorizationDetailsTypesGetModel putSchemaItem(String key, Object schemaItem) { + this.schema.put(key, schemaItem); + return this; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthorizationDetailsTypesGetModel authorizationDetailsTypesGetModel = (AuthorizationDetailsTypesGetModel) o; + return Objects.equals(this.id, authorizationDetailsTypesGetModel.id) && + Objects.equals(this.type, authorizationDetailsTypesGetModel.type) && + Objects.equals(this.name, authorizationDetailsTypesGetModel.name) && + Objects.equals(this.description, authorizationDetailsTypesGetModel.description) && + Objects.equals(this.schema, authorizationDetailsTypesGetModel.schema); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, name, description, schema); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorizationDetailsTypesGetModel {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" schema: ").append(toIndentedString(schema)).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/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesGetModelAllOf.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesGetModelAllOf.java new file mode 100644 index 0000000000..d9a155f5c2 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesGetModelAllOf.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2024, 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.carbon.identity.api.server.api.resource.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.*; + + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; + +public class AuthorizationDetailsTypesGetModelAllOf { + + private String id; + + /** + * an unique id of the registered authorization details type + **/ + public AuthorizationDetailsTypesGetModelAllOf id(String id) { + + this.id = id; + return this; + } + + @ApiModelProperty(example = "a9403470-dd11-46b4-8db9-aaa31f1d4423", required = true, value = "an unique id of the registered authorization details type") + @JsonProperty("id") + @Valid + @NotNull(message = "Property id cannot be null.") + @Size(min=36,max=36) + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthorizationDetailsTypesGetModelAllOf authorizationDetailsTypesGetModelAllOf = (AuthorizationDetailsTypesGetModelAllOf) o; + return Objects.equals(this.id, authorizationDetailsTypesGetModelAllOf.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorizationDetailsTypesGetModelAllOf {\n"); + + sb.append(" id: ").append(toIndentedString(id)).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/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesPatchModel.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesPatchModel.java new file mode 100644 index 0000000000..1d6ae2be03 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesPatchModel.java @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2024, 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.carbon.identity.api.server.api.resource.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.validation.constraints.*; + + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; + +public class AuthorizationDetailsTypesPatchModel { + + private String name; + private String description; + private Map schema = new HashMap(); + + + /** + * display name of the authorization details type + **/ + public AuthorizationDetailsTypesPatchModel name(String name) { + + this.name = name; + return this; + } + + @ApiModelProperty(example = "Payment Initiation", required = true, value = "display name of the authorization details type") + @JsonProperty("name") + @Valid + @NotNull(message = "Property name cannot be null.") + @Size(min=3,max=255) + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + /** + * description of the authorization details type + **/ + public AuthorizationDetailsTypesPatchModel description(String description) { + + this.description = description; + return this; + } + + @ApiModelProperty(example = "Payment initiation authorization details type", required = true, value = "description of the authorization details type") + @JsonProperty("description") + @Valid + @NotNull(message = "Property description cannot be null.") + + public String getDescription() { + return description; + } + public void setDescription(String description) { + this.description = description; + } + + /** + * Accepts the [JSON Schema document](https://json-schema.org/draft/2020-12/json-schema-core#name-json-schema-documents) of the authorization details type + **/ + public AuthorizationDetailsTypesPatchModel schema(Map schema) { + + this.schema = schema; + return this; + } + + @ApiModelProperty(example = "{\"type\":\"object\",\"required\":[\"type\",\"actions\",\"locations\",\"instructedAmount\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"payment_initiation\"]},\"actions\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"enum\":[\"initiate\",\"cancel\"]}},\"locations\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"format\":\"uri\"}},\"instructedAmount\":{\"type\":\"object\",\"properties\":{\"currency\":{\"type\":\"string\",\"minLength\":3},\"amount\":{\"type\":\"string\"}}},\"creditorName\":\"string\",\"creditorAccount\":{\"type\":\"object\"}}}", required = true, value = "Accepts the [JSON Schema document](https://json-schema.org/draft/2020-12/json-schema-core#name-json-schema-documents) of the authorization details type") + @JsonProperty("schema") + @Valid + @NotNull(message = "Property schema cannot be null.") + + public Map getSchema() { + return schema; + } + public void setSchema(Map schema) { + this.schema = schema; + } + + + public AuthorizationDetailsTypesPatchModel putSchemaItem(String key, Object schemaItem) { + this.schema.put(key, schemaItem); + return this; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuthorizationDetailsTypesPatchModel authorizationDetailsTypesPatchModel = (AuthorizationDetailsTypesPatchModel) o; + return Objects.equals(this.name, authorizationDetailsTypesPatchModel.name) && + Objects.equals(this.description, authorizationDetailsTypesPatchModel.description) && + Objects.equals(this.schema, authorizationDetailsTypesPatchModel.schema); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, schema); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class AuthorizationDetailsTypesPatchModel {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" schema: ").append(toIndentedString(schema)).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/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/InlineResponse200.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/InlineResponse200.java new file mode 100644 index 0000000000..c6caa277a6 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/InlineResponse200.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2024, 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.carbon.identity.api.server.api.resource.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.*; + + +import io.swagger.annotations.*; +import java.util.Objects; +import javax.validation.Valid; +import javax.xml.bind.annotation.*; + +public class InlineResponse200 { + + private Boolean exists; + + /** + **/ + public InlineResponse200 exists(Boolean exists) { + + this.exists = exists; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("exists") + @Valid + public Boolean getExists() { + return exists; + } + public void setExists(Boolean exists) { + this.exists = exists; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineResponse200 inlineResponse200 = (InlineResponse200) o; + return Objects.equals(this.exists, inlineResponse200.exists); + } + + @Override + public int hashCode() { + return Objects.hash(exists); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class InlineResponse200 {\n"); + + sb.append(" exists: ").append(toIndentedString(exists)).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/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypesApiServiceFactory.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypesApiServiceFactory.java new file mode 100644 index 0000000000..18cbd9ef8a --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypesApiServiceFactory.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2024, 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.carbon.identity.api.server.api.resource.v1.factories; + +import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesApiService; +import org.wso2.carbon.identity.api.server.api.resource.v1.impl.AuthorizationDetailsTypesApiServiceImpl; + +public class AuthorizationDetailsTypesApiServiceFactory { + + private final static AuthorizationDetailsTypesApiService service = new AuthorizationDetailsTypesApiServiceImpl(); + + public static AuthorizationDetailsTypesApiService getAuthorizationDetailsTypesApi() + { + return service; + } +} diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/constants/APIResourceMgtEndpointConstants.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/constants/APIResourceMgtEndpointConstants.java index af0c9b4cd7..61f2a29da8 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/constants/APIResourceMgtEndpointConstants.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/constants/APIResourceMgtEndpointConstants.java @@ -101,7 +101,10 @@ public enum ErrorMessage { ERROR_CODE_API_RESOURCE_COLLECTION_NOT_FOUND("60014", "Unable to find the API resource collection.", "Unable to find the API resource collection with the id: %s in the tenant domain."), - + ERROR_CODE_AUTHORIZATION_DETAILS_TYPE_NOT_FOUND("60015", + "Unable to find the authorization details type.", + "Unable to find the authorization details types for the resource id: %s in the tenant domain."), + // Server errors. ERROR_CODE_ADD_API_RESOURCE("65001", "Error while adding api resource.", "Server encountered an error while " + "adding the api resource."), diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java new file mode 100644 index 0000000000..e4f28d45ed --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java @@ -0,0 +1,135 @@ +package org.wso2.carbon.identity.api.server.api.resource.v1.core; + +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.context.CarbonContext; +import org.wso2.carbon.identity.api.resource.mgt.APIResourceMgtException; +import org.wso2.carbon.identity.api.server.api.resource.common.APIResourceManagementServiceHolder; +import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesGetModel; +import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesPatchModel; +import org.wso2.carbon.identity.api.server.api.resource.v1.InlineResponse200; +import org.wso2.carbon.identity.api.server.api.resource.v1.constants.APIResourceMgtEndpointConstants; +import org.wso2.carbon.identity.api.server.api.resource.v1.util.APIResourceMgtEndpointUtil; +import org.wso2.carbon.identity.api.server.api.resource.v1.util.AuthorizationDetailsTypeMgtUtil; +import org.wso2.carbon.identity.application.common.model.AuthorizationDetailsType; + +import java.util.List; + +import javax.ws.rs.core.Response; + +public class AuthorizationDetailsTypeManagementService { + + private static final Log LOG = LogFactory.getLog(AuthorizationDetailsTypeManagementService.class); + + public void addAuthorizationDetailsTypes(String apiResourceId, + List typesPatchModels) { + + if (LOG.isDebugEnabled()) { + LOG.debug("Adding authorization details types to resource with id: " + apiResourceId); + } + try { + APIResourceManagementServiceHolder.getAuthorizationDetailsTypeManager() + .addAuthorizationDetailsTypes( + apiResourceId, + AuthorizationDetailsTypeMgtUtil + .toAuthorizationDetailsTypesList(), + CarbonContext.getThreadLocalCarbonContext().getTenantDomain() + ); + } catch (APIResourceMgtException e) { + throw APIResourceMgtEndpointUtil.handleAPIResourceMgtException(e); + } + } + + public void deleteAuthorizationDetailsType(String apiResourceId, String authorizationDetailsType) { + + if (LOG.isDebugEnabled()) { + LOG.debug(String.format("Deleting authorization details type against resource id: %s and type: %s ", + apiResourceId, authorizationDetailsType)); + } + try { + APIResourceManagementServiceHolder.getAuthorizationDetailsTypeManager() + .deleteAuthorizationDetailsTypeByApiIdAndType( + apiResourceId, + authorizationDetailsType, + CarbonContext.getThreadLocalCarbonContext().getTenantDomain() + ); + } catch (APIResourceMgtException e) { + throw APIResourceMgtEndpointUtil.handleAPIResourceMgtException(e); + } + } + + public AuthorizationDetailsTypesGetModel getAuthorizationDetailsType(String apiResourceId, String type) { + if (LOG.isDebugEnabled()) { + LOG.debug(String.format("Retrieving authorization details type against resource id: %s and type: %s ", + apiResourceId, type)); + } + try { + AuthorizationDetailsType authorizationDetailsType = APIResourceManagementServiceHolder + .getAuthorizationDetailsTypeManager() + .getAuthorizationDetailsTypeByApiIdAndType( + apiResourceId, + type, + CarbonContext.getThreadLocalCarbonContext().getTenantDomain() + ); + + if (authorizationDetailsType == null) { + throw APIResourceMgtEndpointUtil.handleException(Response.Status.NOT_FOUND, + APIResourceMgtEndpointConstants.ErrorMessage.ERROR_CODE_AUTHORIZATION_DETAILS_TYPE_NOT_FOUND, apiResourceId); + } + return AuthorizationDetailsTypeMgtUtil.toAuthorizationDetailsGetModel(authorizationDetailsType); + } catch (APIResourceMgtException e) { + throw APIResourceMgtEndpointUtil.handleAPIResourceMgtException(e); + } + } + + public List getAuthorizationDetailsTypes(String apiResourceId) { + if (LOG.isDebugEnabled()) { + LOG.debug(String.format("Retrieving authorization details type against resource id: %s", apiResourceId)); + } + try { + List AuthorizationDetailsTypes = APIResourceManagementServiceHolder + .getAuthorizationDetailsTypeManager() + .getAuthorizationDetailsTypesByApiId( + apiResourceId, + CarbonContext.getThreadLocalCarbonContext().getTenantDomain() + ); + + if (CollectionUtils.isEmpty(AuthorizationDetailsTypes)) { + throw APIResourceMgtEndpointUtil.handleException(Response.Status.NOT_FOUND, + APIResourceMgtEndpointConstants.ErrorMessage.ERROR_CODE_AUTHORIZATION_DETAILS_TYPE_NOT_FOUND, apiResourceId); + } + return AuthorizationDetailsTypeMgtUtil.toAuthorizationDetailsGetModelsList(AuthorizationDetailsTypes); + } catch (APIResourceMgtException e) { + throw APIResourceMgtEndpointUtil.handleAPIResourceMgtException(e); + } + } + + public InlineResponse200 isAuthorizationDetailsTypeExists(String apiResourceId, String authorizationDetailsType) { + try { + return new InlineResponse200() + .exists(APIResourceManagementServiceHolder.getAuthorizationDetailsTypeManager() + .isAuthorizationDetailsTypeExists(apiResourceId, authorizationDetailsType)); + } catch (APIResourceMgtException e) { + throw APIResourceMgtEndpointUtil.handleAPIResourceMgtException(e); + } + } + + public void updateAuthorizationDetailsTypes(String apiResourceId, String authorizationDetailsType, + AuthorizationDetailsTypesPatchModel typesPatchModel) { + + if (LOG.isDebugEnabled()) { + LOG.debug(String.format("Updating authorization details type against resource id: %s and type: %s ", + apiResourceId, authorizationDetailsType)); + } + try { + APIResourceManagementServiceHolder.getAuthorizationDetailsTypeManager() + .updateAuthorizationDetailsType(AuthorizationDetailsTypeMgtUtil + .toAuthorizationDetailsType(authorizationDetailsType, typesPatchModel), + CarbonContext.getThreadLocalCarbonContext().getTenantDomain() + ); + } catch (APIResourceMgtException e) { + throw APIResourceMgtEndpointUtil.handleAPIResourceMgtException(e); + } + } +} diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/ApiResourcesApiServiceImpl.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/ApiResourcesApiServiceImpl.java index 518fb033da..34bc7d907c 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/ApiResourcesApiServiceImpl.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/ApiResourcesApiServiceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2024, 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 @@ -23,9 +23,11 @@ import org.wso2.carbon.identity.api.server.api.resource.v1.APIResourcePatchModel; import org.wso2.carbon.identity.api.server.api.resource.v1.APIResourceResponse; import org.wso2.carbon.identity.api.server.api.resource.v1.ApiResourcesApiService; +import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesPatchModel; import org.wso2.carbon.identity.api.server.api.resource.v1.ScopeCreationModel; import org.wso2.carbon.identity.api.server.api.resource.v1.ScopePatchModel; import org.wso2.carbon.identity.api.server.api.resource.v1.constants.APIResourceMgtEndpointConstants; +import org.wso2.carbon.identity.api.server.api.resource.v1.core.AuthorizationDetailsTypeManagementService; import org.wso2.carbon.identity.api.server.api.resource.v1.core.ServerAPIResourceManagementService; import org.wso2.carbon.identity.api.server.common.ContextLoader; @@ -44,6 +46,9 @@ public class ApiResourcesApiServiceImpl implements ApiResourcesApiService { @Autowired ServerAPIResourceManagementService serverAPIResourceManagementService; + @Autowired + AuthorizationDetailsTypeManagementService authorizationDetailsTypeManagementService; + @Override public Response addAPIResource(APIResourceCreationModel apIResourceCreationModel) { @@ -110,4 +115,49 @@ public Response getAPIResources(String before, String after, String filter, Inte return Response.ok().entity(serverAPIResourceManagementService.getAPIResources(before, after, filter, limit, attributes)).build(); } + + @Override + public Response addsAuthorizationDetailsTypes(String apiResourceId, + List typesPatchModel) { + + authorizationDetailsTypeManagementService.addAuthorizationDetailsTypes(apiResourceId, typesPatchModel); + return Response.accepted().build(); + } + + @Override + public Response deleteAnAuthorizationDetailsType(String apiResourceId, String authorizationDetailsType) { + + authorizationDetailsTypeManagementService.deleteAuthorizationDetailsType(apiResourceId, authorizationDetailsType); + return Response.noContent().build(); + } + + @Override + public Response getAnAuthorizationDetailsType(String apiResourceId, String authorizationDetailsType) { + + return Response.ok().entity(authorizationDetailsTypeManagementService + .getAuthorizationDetailsType(apiResourceId, authorizationDetailsType)).build(); + } + + @Override + public Response getAuthorizationDetailsType(String apiResourceId) { + + return Response.ok() + .entity(authorizationDetailsTypeManagementService.getAuthorizationDetailsTypes(apiResourceId)).build(); + } + + @Override + public Response isAuthorizationDetailsTypeExists(String apiResourceId, String authorizationDetailsType) { + + return Response.ok().entity(authorizationDetailsTypeManagementService + .isAuthorizationDetailsTypeExists(apiResourceId, authorizationDetailsType)).build(); + } + + @Override + public Response updateAnAuthorizationDetailsType(String apiResourceId, String authorizationDetailsType, + AuthorizationDetailsTypesPatchModel typesPatchModel) { + + authorizationDetailsTypeManagementService + .updateAuthorizationDetailsTypes(apiResourceId, authorizationDetailsType, typesPatchModel); + return Response.accepted().build(); + } } diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/AuthorizationDetailsTypesApiServiceImpl.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/AuthorizationDetailsTypesApiServiceImpl.java new file mode 100644 index 0000000000..46f3b2e6f7 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/AuthorizationDetailsTypesApiServiceImpl.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2024, 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.carbon.identity.api.server.api.resource.v1.impl; + +import org.wso2.carbon.identity.api.server.api.resource.v1.*; +import org.wso2.carbon.identity.api.server.api.resource.v1.*; +import java.util.List; + +import javax.ws.rs.core.Response; + +public class AuthorizationDetailsTypesApiServiceImpl implements AuthorizationDetailsTypesApiService { + + @Override + public Response authorizationDetailsTypesGet(String filter) { + + // do some magic! + return Response.ok().entity("magic!").build(); + } +} diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java new file mode 100644 index 0000000000..f3583c58a1 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java @@ -0,0 +1,79 @@ +package org.wso2.carbon.identity.api.server.api.resource.v1.util; + +import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; +import org.apache.commons.collections.CollectionUtils; +import org.json.JSONObject; +import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesCreationModel; +import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesGetModel; +import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesPatchModel; +import org.wso2.carbon.identity.application.common.model.AuthorizationDetailsType; + +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +public class AuthorizationDetailsTypeMgtUtil { + + public static AuthorizationDetailsTypesGetModel toAuthorizationDetailsGetModel( + final AuthorizationDetailsType authorizationDetailsType) { + + return new AuthorizationDetailsTypesGetModel() + .name(authorizationDetailsType.getName()) + .description(authorizationDetailsType.getDescription()) + .type(authorizationDetailsType.getType()) + .schema(new Gson().fromJson(authorizationDetailsType.getSchema(), new TypeToken>() { + }.getType())); + } + + public static List toAuthorizationDetailsGetModelsList( + final List authorizationDetailsTypes) { + + return CollectionUtils.isEmpty(authorizationDetailsTypes) ? Collections.emptyList() : + authorizationDetailsTypes.stream().map(AuthorizationDetailsTypeMgtUtil::toAuthorizationDetailsGetModel) + .collect(Collectors.toList()); + } + + public static List toAuthorizationDetailsTypesList( + final List typesCreationModels) { + + return CollectionUtils.isEmpty(typesCreationModels) ? Collections.emptyList() : + typesCreationModels.stream() + .map(AuthorizationDetailsTypeMgtUtil::toAuthorizationDetailsType) + .collect(Collectors.toList()); + } + + public static AuthorizationDetailsType toAuthorizationDetailsType( + final AuthorizationDetailsTypesCreationModel typesCreationModel) { + + final AuthorizationDetailsType authorizationDetailsType = new AuthorizationDetailsType(); + authorizationDetailsType.setType(typesCreationModel.getType()); + authorizationDetailsType.setName(typesCreationModel.getName()); + authorizationDetailsType.setDescription(typesCreationModel.getDescription()); + authorizationDetailsType.setSchema(new JSONObject(typesCreationModel.getSchema()).toString()); + + return authorizationDetailsType; + } + + public static List toAuthorizationDetailsTypesList( + final List typesPatchModels) { + + return CollectionUtils.isEmpty(typesPatchModels) ? Collections.emptyList() : + typesPatchModels.stream() + .map(AuthorizationDetailsTypeMgtUtil::toAuthorizationDetailsType) + .collect(Collectors.toList()); + } + + public static AuthorizationDetailsType toAuthorizationDetailsType(final String type, + final AuthorizationDetailsTypesPatchModel typesPatchModel) { + + final AuthorizationDetailsType authorizationDetailsType = new AuthorizationDetailsType(); + authorizationDetailsType.setType(type); + authorizationDetailsType.setName(typesPatchModel.getName()); + authorizationDetailsType.setDescription(typesPatchModel.getDescription()); + authorizationDetailsType.setSchema(new JSONObject(typesPatchModel.getSchema()).toString()); + + return authorizationDetailsType; + } +} diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/resources/APIResources.yaml b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/resources/APIResources.yaml index 28b8c10e5f..0e363af8e9 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/resources/APIResources.yaml +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/resources/APIResources.yaml @@ -444,6 +444,296 @@ paths: schema: $ref: '#/components/schemas/Error' + /api-resources/{apiResourceId}/authorization-details-types: + get: + tags: + - API Resource Authorization Details Types + description: | + This API is used to get all registered authorization details types. + + Permission required: + * /permission/admin/manage/identity/apiresourcemgt/view + + Scope required: + * internal_api_resource_view + summary: Lists all registered authorization details types + operationId: getAuthorizationDetailsType + parameters: + - $ref: '#/components/parameters/apiResourceId' + responses: + 200: + description: Successfully retrieved a list of authorization details types + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/AuthorizationDetailsTypesGetModel" + 401: + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + 404: + description: Requested resource is not found + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + 500: + description: Encountered a server error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + put: + tags: + - API Resource Authorization Details Types + description: | + This API is used to add a new authorization details type to API resource. + + Permission required: + * /permission/admin/manage/identity/apiresourcemgt/update + + Scope required: + * internal_api_resource_update + summary: Adds new authorization details types to the API resource + operationId: addsAuthorizationDetailsTypes + parameters: + - $ref: '#/components/parameters/apiResourceId' + requestBody: + content: + "application/json": + schema: + type: array + items: + $ref: "#/components/schemas/AuthorizationDetailsTypesPatchModel" + responses: + 204: + description: No Content + 401: + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + 404: + description: Requested resource is not found + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + 500: + description: Encountered a server error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + + /api-resources/{apiResourceId}/authorization-details-types/{authorizationDetailsType}: + get: + tags: + - API Resource Authorization Details Types + description: | + This API is used to retrieve details of a registered authorization details type by a given type. + + Permission required: + * /permission/admin/manage/identity/apiresourcemgt/view + + Scope required: + * internal_api_resource_view + summary: Returns a registered authorization details type by type + operationId: getAnAuthorizationDetailsType + parameters: + - $ref: '#/components/parameters/apiResourceId' + - $ref: '#/components/parameters/authorizationDetailsType' + responses: + 200: + description: Successfully retrieved an authorization details type by type + content: + application/json: + schema: + $ref: "#/components/schemas/AuthorizationDetailsTypesGetModel" + 401: + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + 404: + description: Requested resource is not found + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + 500: + description: Encountered a server error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + head: + tags: + - API Resource Authorization Details Types + description: | + This API is used to check a registered authorization details type's existence using a given type. + + Permission required: + * /permission/admin/manage/identity/apiresourcemgt/view + + Scope required: + * internal_api_resource_view + summary: Checks an authorization details type existence by type + operationId: isAuthorizationDetailsTypeExists + parameters: + - $ref: '#/components/parameters/apiResourceId' + - $ref: '#/components/parameters/authorizationDetailsType' + responses: + 200: + description: Provided authorization details type exists + content: + application/json: + schema: + type: object + properties: + exists: + type: boolean + 401: + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + 404: + description: Requested resource is not found + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + 500: + description: Encountered a server error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + patch: + tags: + - API Resource Authorization Details Types + description: | + This API is used to update a registered authorization details type by a given type. + + Permission required: + * /permission/admin/manage/identity/apiresourcemgt/update + + Scope required: + * internal_api_resource_update + summary: Updates a registered authorization details type by type + operationId: updateAnAuthorizationDetailsType + parameters: + - $ref: '#/components/parameters/apiResourceId' + - $ref: '#/components/parameters/authorizationDetailsType' + requestBody: + content: + "application/json": + schema: + $ref: "#/components/schemas/AuthorizationDetailsTypesPatchModel" + responses: + 200: + description: Successfully updated an authorization details type by type + content: + application/json: + schema: + $ref: "#/components/schemas/AuthorizationDetailsTypesGetModel" + 401: + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + 404: + description: Requested resource is not found + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + 500: + description: Encountered a server error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + delete: + tags: + - API Resource Authorization Details Types + description: | + This API is used to delete a registered authorization details type by a given type. + + Permission required: + * /permission/admin/manage/identity/apiresourcemgt/delete + + Scope required: + * internal_api_resource_delete + summary: Deletes a registered authorization details type by type + operationId: deleteAnAuthorizationDetailsType + parameters: + - $ref: '#/components/parameters/apiResourceId' + - $ref: '#/components/parameters/authorizationDetailsType' + responses: + 204: + description: Successfully deleted an authorization details type by type + 401: + description: Unauthorized request + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + 500: + description: Encountered a server error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + + /authorization-details-types: + get: + tags: + - API Resource Authorization Details Types + summary: Gets all authorization details types in the tenant + description: > + Get all authorization details types in the tenant + Permission required:
+ * /permission/admin/manage/identity/apiresourcemgt/view
+ Scope required:
+ * internal_api_resource_view + parameters: + - $ref: '#/components/parameters/filter' + responses: + 200: + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AuthorizationDetailsTypesGetModel' + 401: + description: Unauthorized + 403: + description: Forbidden + 404: + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 500: + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /meta/api-resource-collections: get: tags: @@ -628,6 +918,15 @@ components: schema: type: string + authorizationDetailsType: + name: authorizationDetailsType + in: path + description: Type of the authorization details type that is to be retrieved + required: true + schema: + type: string + example: payment_initiation + schemas: Error: type: object @@ -706,6 +1005,10 @@ components: type: array items: $ref: '#/components/schemas/ScopeGetModel' + authorizationDetailsTypes: + type: array + items: + $ref: '#/components/schemas/AuthorizationDetailsTypesGetModel' subscribedApplications: type: array items: @@ -740,6 +1043,10 @@ components: type: array items: $ref: '#/components/schemas/ScopeCreationModel' + authorizationDetailsTypes: + type: array + items: + $ref: '#/components/schemas/AuthorizationDetailsTypesGetModel' APIResourcePatchModel: type: object @@ -759,6 +1066,10 @@ components: items: type: string description: This field is not supported yet. + authorizationDetailsTypes: + type: array + items: + $ref: '#/components/schemas/AuthorizationDetailsTypesGetModel' PaginationLink: type: object @@ -960,6 +1271,91 @@ components: type: string example: "Internal" + AuthorizationDetailsTypesPatchModel: + type: object + required: + - name + - description + - schema + properties: + name: + type: string + minLength: 3 + maxLength: 255 + description: display name of the authorization details type + example: Payment Initiation + description: + type: string + description: description of the authorization details type + example: Payment initiation authorization details type + schema: + type: object + additionalProperties: true + description: Accepts the [JSON Schema document](https://json-schema.org/draft/2020-12/json-schema-core#name-json-schema-documents) of the authorization details type + example: + type: object + required: + - type + - actions + - locations + - instructedAmount + properties: + type: + type: string + enum: + - payment_initiation + actions: + type: array + items: + type: string + enum: + - initiate + - cancel + locations: + type: array + items: + type: string + format: uri + instructedAmount: + type: object + properties: + currency: + type: string + minLength: 3 + amount: + type: string + creditorName: string + creditorAccount: + type: object + + AuthorizationDetailsTypesCreationModel: + allOf: + - type: object + required: + - type + properties: + type: + type: string + example: payment_initiation + description: an unique type of the authorization details type + minLength: 1 + maxLength: 255 + - $ref: "#/components/schemas/AuthorizationDetailsTypesPatchModel" + + AuthorizationDetailsTypesGetModel: + allOf: + - type: object + required: + - id + properties: + id: + type: string + example: a9403470-dd11-46b4-8db9-aaa31f1d4423 + description: an unique id of the registered authorization details type + minLength: 36 + maxLength: 36 + - $ref: "#/components/schemas/AuthorizationDetailsTypesCreationModel" + responses: BadRequest: description: Bad Request. Invalid request or validation error. diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/resources/META-INF/cxf/api-resource-server-v1-cxf.xml b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/resources/META-INF/cxf/api-resource-server-v1-cxf.xml index d977454b72..60c594a645 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/resources/META-INF/cxf/api-resource-server-v1-cxf.xml +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/resources/META-INF/cxf/api-resource-server-v1-cxf.xml @@ -1,6 +1,6 @@ + + + + + org.jacoco org.jacoco.agent @@ -809,7 +809,7 @@ 1.4 1.2.4 1.9.17 - 7.3.72 + 7.3.75-SNAPSHOT 3.0.5 1.12.0 **/gen/**/* From 1668b5acca88a0574cb53c6526e393502f34d68f Mon Sep 17 00:00:00 2001 From: vimukthiRajapaksha Date: Mon, 28 Oct 2024 14:28:24 +0530 Subject: [PATCH 06/13] Update license headers --- .../pom.xml | 1 - .../dependencies.txt | 300 ------------------ .../pom.xml | 1 - .../api/resource/v1/ApiResourcesApi.java | 2 +- ...rizationDetailsTypesApiServiceFactory.java | 12 +- ...orizationDetailsTypeManagementService.java | 6 +- .../ServerAPIResourceManagementService.java | 2 +- .../v1/impl/ApiResourcesApiServiceImpl.java | 2 +- .../util/AuthorizationDetailsTypeMgtUtil.java | 3 +- .../pom.xml | 3 - pom.xml | 6 +- 11 files changed, 18 insertions(+), 320 deletions(-) delete mode 100644 components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/dependencies.txt diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/pom.xml b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/pom.xml index 4bed962019..04a212ea65 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/pom.xml @@ -61,7 +61,6 @@ org.wso2.carbon.identity.framework org.wso2.carbon.identity.api.resource.mgt - 7.3.75-SNAPSHOT provided diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/dependencies.txt b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/dependencies.txt deleted file mode 100644 index d0e5de3760..0000000000 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/dependencies.txt +++ /dev/null @@ -1,300 +0,0 @@ -[INFO] Scanning for projects... -Downloading from wso2.releases: https://maven.wso2.org/nexus/content/repositories/releases/org/apache/maven/plugins/maven-assembly-plugin/3.0.0/maven-assembly-plugin-3.0.0.pom -Downloading from wso2-nexus: https://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-assembly-plugin/3.0.0/maven-assembly-plugin-3.0.0.pom -Progress (1): 684 B Progress (1): 2.1 kB Progress (1): 4.7 kB Progress (1): 8.4 kB Progress (1): 11 kB Progress (1): 12 kB Progress (1): 14 kB Progress (1): 15 kB Downloaded from wso2-nexus: https://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-assembly-plugin/3.0.0/maven-assembly-plugin-3.0.0.pom (15 kB at 28 kB/s) -Downloading from wso2.releases: https://maven.wso2.org/nexus/content/repositories/releases/org/apache/maven/plugins/maven-assembly-plugin/3.0.0/maven-assembly-plugin-3.0.0.jar -Downloading from wso2-nexus: https://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-assembly-plugin/3.0.0/maven-assembly-plugin-3.0.0.jar -Progress (1): 0.4/241 kB Progress (1): 1.8/241 kB Progress (1): 3.1/241 kB Progress (1): 4.5/241 kB Progress (1): 5.9/241 kB Progress (1): 7.2/241 kB Progress (1): 8.6/241 kB Progress (1): 10.0/241 kB Progress (1): 11/241 kB Progress (1): 13/241 kB Progress (1): 14/241 kB Progress (1): 15/241 kB Progress (1): 17/241 kB Progress (1): 18/241 kB Progress (1): 20/241 kB Progress (1): 21/241 kB Progress (1): 22/241 kB Progress (1): 24/241 kB Progress (1): 25/241 kB Progress (1): 26/241 kB Progress (1): 28/241 kB Progress (1): 29/241 kB Progress (1): 30/241 kB Progress (1): 32/241 kB Progress (1): 33/241 kB Progress (1): 34/241 kB Progress (1): 36/241 kB Progress (1): 37/241 kB Progress (1): 39/241 kB Progress (1): 40/241 kB Progress (1): 44/241 kB Progress (1): 45/241 kB Progress (1): 50/241 kB Progress (1): 54/241 kB Progress (1): 58/241 kB Progress (1): 62/241 kB Progress (1): 66/241 kB Progress (1): 70/241 kB Progress (1): 74/241 kB Progress (1): 78/241 kB Progress (1): 82/241 kB Progress (1): 87/241 kB Progress (1): 91/241 kB Progress (1): 94/241 kB Progress (1): 99/241 kB Progress (1): 103/241 kB Progress (1): 107/241 kB Progress (1): 111/241 kB Progress (1): 116/241 kB Progress (1): 120/241 kB Progress (1): 124/241 kB Progress (1): 127/241 kB Progress (1): 131/241 kB Progress (1): 136/241 kB Progress (1): 140/241 kB Progress (1): 144/241 kB Progress (1): 148/241 kB Progress (1): 152/241 kB Progress (1): 156/241 kB Progress (1): 160/241 kB Progress (1): 164/241 kB Progress (1): 168/241 kB Progress (1): 173/241 kB Progress (1): 177/241 kB Progress (1): 181/241 kB Progress (1): 185/241 kB Progress (1): 190/241 kB Progress (1): 193/241 kB Progress (1): 197/241 kB Progress (1): 201/241 kB Progress (1): 218/241 kB Progress (1): 226/241 kB Progress (1): 241 kB Downloaded from wso2-nexus: https://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-assembly-plugin/3.0.0/maven-assembly-plugin-3.0.0.jar (241 kB at 170 kB/s) -[INFO] -[INFO] --< org.wso2.carbon.identity.server.api:org.wso2.carbon.identity.api.server.api.resource.v1 >-- -[INFO] Building WSO2 Identity Server - API Resource Rest API 1.2.222-SNAPSHOT -[INFO] from pom.xml -[INFO] --------------------------------[ jar ]--------------------------------- -[INFO] -[INFO] --- dependency:2.10:tree (default-cli) @ org.wso2.carbon.identity.api.server.api.resource.v1 --- -[INFO] org.wso2.carbon.identity.server.api:org.wso2.carbon.identity.api.server.api.resource.v1:jar:1.2.222-SNAPSHOT -[INFO] +- org.wso2.carbon.identity.organization.management.core:org.wso2.carbon.identity.organization.management.service:jar:1.1.12:provided -[INFO] | \- com.github.spotbugs:spotbugs-annotations:jar:4.1.3:provided -[INFO] | \- com.google.code.findbugs:jsr305:jar:3.0.2:provided -[INFO] +- org.apache.cxf:cxf-rt-frontend-jaxrs:jar:3.5.0:provided -[INFO] | +- org.apache.cxf:cxf-core:jar:3.5.0:provided -[INFO] | | +- org.glassfish.jaxb:jaxb-runtime:jar:2.3.5:provided -[INFO] | | | +- org.glassfish.jaxb:txw2:jar:2.3.5:provided -[INFO] | | | \- com.sun.istack:istack-commons-runtime:jar:3.0.12:provided -[INFO] | | +- com.fasterxml.woodstox:woodstox-core:jar:6.2.7:provided -[INFO] | | +- org.apache.ws.xmlschema:xmlschema-core:jar:2.3.0:provided -[INFO] | | \- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:provided -[INFO] | +- jakarta.ws.rs:jakarta.ws.rs-api:jar:2.1.6:provided -[INFO] | +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:provided -[INFO] | +- org.apache.cxf:cxf-rt-transports-http:jar:3.5.0:provided -[INFO] | +- org.apache.cxf:cxf-rt-security:jar:3.5.0:provided -[INFO] | +- jakarta.xml.ws:jakarta.xml.ws-api:jar:2.3.3:provided -[INFO] | +- jakarta.jws:jakarta.jws-api:jar:2.1.0:provided -[INFO] | +- jakarta.xml.soap:jakarta.xml.soap-api:jar:1.4.2:provided -[INFO] | | \- jakarta.activation:jakarta.activation-api:jar:1.2.2:provided -[INFO] | +- com.sun.activation:jakarta.activation:jar:1.2.2:provided -[INFO] | +- com.sun.xml.messaging.saaj:saaj-impl:jar:1.5.3:provided -[INFO] | | \- org.jvnet.staxex:stax-ex:jar:1.8.3:provided -[INFO] | \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:provided -[INFO] +- org.apache.cxf:cxf-rt-rs-service-description:jar:3.5.0:provided -[INFO] +- javax.ws.rs:javax.ws.rs-api:jar:2.1.1:provided -[INFO] +- io.swagger:swagger-jaxrs:jar:1.6.2:compile -[INFO] | +- io.swagger:swagger-core:jar:1.6.2:compile -[INFO] | | +- org.apache.commons:commons-lang3:jar:3.2.1:compile -[INFO] | | +- org.slf4j:slf4j-api:jar:1.7.22:compile -[INFO] | | +- io.swagger:swagger-models:jar:1.6.2:compile -[INFO] | | | \- io.swagger:swagger-annotations:jar:1.6.2:compile -[INFO] | | \- javax.validation:validation-api:jar:1.1.0.Final:compile -[INFO] | \- org.reflections:reflections:jar:0.9.11:compile -[INFO] | \- org.javassist:javassist:jar:3.21.0-GA:compile -[INFO] +- org.springframework:spring-web:jar:5.3.25:provided -[INFO] | +- org.springframework:spring-beans:jar:5.3.25:provided -[INFO] | \- org.springframework:spring-core:jar:5.3.25:provided -[INFO] | \- org.springframework:spring-jcl:jar:5.3.25:provided -[INFO] +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.16.1:provided -[INFO] | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.16.1:provided -[INFO] | | +- com.fasterxml.jackson.core:jackson-core:jar:2.16.1:provided -[INFO] | | \- com.fasterxml.jackson.core:jackson-databind:jar:2.16.1:provided -[INFO] | \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.16.1:provided -[INFO] +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.api.resource.mgt:jar:7.3.75-SNAPSHOT:provided -[INFO] | +- org.apache.felix:org.apache.felix.scr.ds-annotations:jar:1.2.4:provided -[INFO] | +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.core:jar:7.3.72:provided -[INFO] | | +- commons-logging:commons-logging:jar:1.2:provided -[INFO] | | +- org.wso2.securevault:org.wso2.securevault:jar:1.1.3:provided -[INFO] | | | +- org.apache.ws.commons.axiom:axiom-api:jar:1.2.11:provided -[INFO] | | | | +- org.apache.geronimo.specs:geronimo-activation_1.1_spec:jar:1.0.2:provided -[INFO] | | | | \- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.6:provided -[INFO] | | | +- org.apache.ws.commons.axiom:axiom-impl:jar:1.2.11:provided -[INFO] | | | | \- org.codehaus.woodstox:wstx-asl:jar:3.2.9:provided -[INFO] | | | +- jline:jline:jar:0.9.94:provided -[INFO] | | | | \- junit:junit:jar:3.8.1:provided -[INFO] | | | +- commons-cli:commons-cli:jar:1.0:provided -[INFO] | | | \- commons-io:commons-io:jar:2.0:provided -[INFO] | | +- org.wso2.carbon.commons:org.wso2.carbon.tenant.common:jar:4.7.39:provided -[INFO] | | +- ua.parser.wso2:ua-parser:jar:1.5.4.wso2v2:provided -[INFO] | | | \- org.yaml:snakeyaml:jar:2.0:provided -[INFO] | | \- xml-apis:xml-apis:jar:1.4.01:provided -[INFO] | \- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.event:jar:7.3.75-SNAPSHOT:provided -[INFO] | \- org.apache.axis2.transport:axis2-transport-mail:jar:2.0.0-wso2v42:provided -[INFO] | +- javax.mail:mail:jar:1.4.1:provided -[INFO] | | \- javax.activation:activation:jar:1.1:provided -[INFO] | +- org.apache.axis2:axis2-transport-base:jar:1.6.1-wso2v40:provided -[INFO] | +- org.apache.axis2:axis2-kernel:jar:1.6.1-wso2v40:provided -[INFO] | | +- commons-httpclient:commons-httpclient:jar:3.1:provided -[INFO] | | +- wsdl4j:wsdl4j:jar:1.6.2:provided -[INFO] | | +- org.apache.neethi:neethi:jar:2.0.4:provided -[INFO] | | +- org.apache.woden:woden-api:jar:1.0M9:provided -[INFO] | | | \- org.apache.ws.commons.schema:XmlSchema:jar:1.4.7:provided -[INFO] | | +- org.apache.woden:woden-impl-dom:jar:1.0M9:provided -[INFO] | | | \- org.apache.woden:woden-impl-commons:jar:1.0M9:provided -[INFO] | | \- javax.ws.rs:jsr311-api:jar:1.0:provided -[INFO] | \- org.wso2.orbit.javax.activation:activation:jar:1.1.1.wso2v2:provided -[INFO] +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.api.resource.collection.mgt:jar:7.3.72:provided -[INFO] +- org.wso2.carbon.identity.server.api:org.wso2.carbon.identity.api.server.common:jar:1.2.222-SNAPSHOT:provided -[INFO] +- org.apache.cxf:cxf-rt-rs-extension-search:jar:3.3.1:provided -[INFO] | +- javax.annotation:javax.annotation-api:jar:1.3.1:provided -[INFO] | +- javax.xml.ws:jaxws-api:jar:2.3.0:provided -[INFO] | | \- javax.xml.soap:javax.xml.soap-api:jar:1.4.0:provided -[INFO] | +- com.sun.activation:javax.activation:jar:1.2.0:provided -[INFO] | +- org.apache.geronimo.specs:geronimo-ws-metadata_2.0_spec:jar:1.1.3:provided -[INFO] | \- org.jboss.spec.javax.rmi:jboss-rmi-api_1.0_spec:jar:1.0.6.Final:provided -[INFO] +- org.wso2.carbon.identity.server.api:org.wso2.carbon.identity.api.server.api.resource.common:jar:1.2.222-SNAPSHOT:provided -[INFO] +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.application.common:jar:7.3.75-SNAPSHOT:provided -[INFO] | +- org.wso2.carbon:org.wso2.carbon.user.core:jar:4.9.17:provided -[INFO] | | +- org.wso2.carbon:org.wso2.carbon.user.api:jar:4.9.17:provided -[INFO] | | +- org.wso2.orbit.xerces:xercesImpl:jar:2.12.2.wso2v1:provided -[INFO] | | +- org.wso2.org.ops4j.pax.logging:pax-logging-api:jar:2.1.0-wso2v4:provided -[INFO] | | | +- org.osgi:osgi.core:jar:7.0.0:provided -[INFO] | | | \- org.osgi:osgi.cmpn:jar:7.0.0:provided -[INFO] | | +- org.wso2.orbit.org.apache.tomcat:jdbc-pool:jar:9.0.65.wso2v1:provided -[INFO] | | +- org.wso2.orbit.org.apache.tomcat:tomcat:jar:9.0.82.wso2v1:provided -[INFO] | | +- org.wso2.orbit.commons-collections:commons-collections:jar:3.2.2.wso2v1:provided -[INFO] | | +- com.google.code.gson:gson:jar:2.9.0:provided -[INFO] | | +- org.osgi:org.osgi.service.component.annotations:jar:1.3.0:provided -[INFO] | | +- org.osgi:org.osgi.annotation:jar:6.0.0:provided -[INFO] | | +- org.osgi:org.osgi.service.metatype.annotations:jar:1.3.0:provided -[INFO] | | \- org.wso2.carbon.crypto:org.wso2.carbon.crypto.api:jar:1.1.14:provided -[INFO] | +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.base:jar:7.3.72:provided -[INFO] | | \- org.wso2.orbit.org.apache.neethi:neethi:jar:2.0.4.wso2v5:provided -[INFO] | +- org.json.wso2:json:jar:3.0.0.wso2v1:provided -[INFO] | | \- org.json:json:jar:20140107:provided -[INFO] | +- org.wso2.orbit.javax.xml.bind:jaxb-api:jar:2.3.1.wso2v1:provided -[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.16.1:provided -[INFO] | \- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.central.log.mgt:jar:7.3.75-SNAPSHOT:provided -[INFO] \- org.wso2.carbon.identity.inbound.auth.oauth2:org.wso2.carbon.identity.oauth:jar:7.0.150-SNAPSHOT:provided -[INFO] +- org.apache.tomcat:tomcat-coyote:jar:9.0.93:provided -[INFO] | +- org.apache.tomcat:tomcat-servlet-api:jar:9.0.93:provided -[INFO] | +- org.apache.tomcat:tomcat-jni:jar:9.0.93:provided -[INFO] | +- org.apache.tomcat:tomcat-juli:jar:9.0.93:provided -[INFO] | \- org.apache.tomcat:tomcat-util:jar:9.0.93:provided -[INFO] +- commons-lang.wso2:commons-lang:jar:2.6.0.wso2v1:provided -[INFO] +- org.ops4j.pax.logging:pax-logging-api:jar:1.10.1:provided -[INFO] +- org.wso2.carbon:javax.cache.wso2:jar:4.9.23:provided -[INFO] | +- org.eclipse.platform:org.eclipse.osgi:jar:3.14.0:provided -[INFO] | \- org.wso2.carbon:org.wso2.carbon.base:jar:4.9.23:provided -[INFO] | \- org.wso2.carbon:org.wso2.carbon.securevault:jar:4.9.23:provided -[INFO] +- org.wso2.orbit.commons-codec:commons-codec:jar:1.16.0.wso2v1:provided -[INFO] +- com.google.gdata.wso2:gdata-core:jar:1.47.0.wso2v1:provided -[INFO] +- org.apache.ws.commons.axiom.wso2:axiom:jar:1.2.11-wso2v16:provided -[INFO] | +- org.apache.geronimo.specs.wso2:geronimo-stax-api_1.0_spec:jar:1.0.1.wso2v2:provided -[INFO] | | \- org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1:provided -[INFO] | +- org.codehaus.woodstox:woodstox-core-asl:jar:4.2.0:provided -[INFO] | \- org.codehaus.woodstox:stax2-api:jar:3.1.4:provided -[INFO] +- org.apache.axis2.wso2:axis2:jar:1.6.1-wso2v38:provided -[INFO] +- org.wso2.carbon:org.wso2.carbon.utils:jar:4.9.17:provided -[INFO] | +- org.wso2.orbit.org.bouncycastle:bcprov-jdk15on:jar:1.70.0.wso2v1:provided -[INFO] | | \- org.bouncycastle:bcprov-jdk15on:jar:1.70:provided -[INFO] | +- org.wso2.carbon:org.wso2.carbon.bootstrap:jar:4.9.17:provided -[INFO] | | \- wrapper:wrapper:jar:3.2.3:provided -[INFO] | +- org.wso2.org.ops4j.pax.logging:pax-logging-log4j2:jar:2.1.0-wso2v4:provided -[INFO] | +- org.wso2.carbon:org.wso2.carbon.queuing:jar:4.9.17:provided -[INFO] | +- org.igniterealtime.smack.wso2:smack:jar:3.0.4.wso2v1:provided -[INFO] | +- org.igniterealtime.smack.wso2:smackx:jar:3.0.4.wso2v1:provided -[INFO] | +- jaxen:jaxen:jar:1.1.1:provided -[INFO] | | +- jdom:jdom:jar:1.0:provided -[INFO] | | +- xerces:xercesImpl:jar:2.6.2:provided -[INFO] | | \- xom:xom:jar:1.0:provided -[INFO] | | \- xerces:xmlParserAPIs:jar:2.6.2:provided -[INFO] | +- org.wso2.orbit.commons-fileupload:commons-fileupload:jar:1.5.0.wso2v2:provided -[INFO] | +- org.apache.ant.wso2:ant:jar:1.10.12.wso2v1:provided -[INFO] | | \- org.apache.ant:ant:jar:1.10.12:provided -[INFO] | | \- org.apache.ant:ant-launcher:jar:1.10.12:provided -[INFO] | +- org.eclipse.equinox:javax.servlet:jar:3.0.0.v201112011016:provided -[INFO] | +- org.wso2.orbit.commons-httpclient:commons-httpclient:jar:3.1.0.wso2v6:provided -[INFO] | +- org.wso2.carbon:org.wso2.carbon.registry.api:jar:4.9.17:provided -[INFO] | +- org.wso2.orbit.org.apache.httpcomponents:httpclient:jar:4.5.13.wso2v1:provided -[INFO] | \- org.wso2.orbit.org.apache.commons:commons-lang3:jar:3.4.0.wso2v1:provided -[INFO] +- org.wso2.carbon:org.wso2.carbon.core:jar:4.9.23:provided -[INFO] | +- org.eclipse.equinox:org.eclipse.equinox.http.helper:jar:1.1.0.wso2v1:provided -[INFO] | | \- org.eclipse.osgi:org.eclipse.osgi.services:jar:3.3.0.v20110513:provided -[INFO] | +- org.wso2.orbit.org.bouncycastle:bcprov-jdk18on:jar:1.74.0.wso2v1:provided -[INFO] | | \- org.bouncycastle:bcprov-jdk18on:jar:1.74:provided -[INFO] | +- org.apache.httpcomponents.wso2:httpcore:jar:4.4.14.wso2v1:provided -[INFO] | +- org.apache.tomcat:tomcat-catalina-ha:jar:9.0.82:provided -[INFO] | | +- org.apache.tomcat:tomcat-tribes:jar:9.0.82:provided -[INFO] | | +- org.apache.tomcat:tomcat-catalina:jar:9.0.82:provided -[INFO] | | | +- org.apache.tomcat:tomcat-jsp-api:jar:9.0.82:provided -[INFO] | | | | \- org.apache.tomcat:tomcat-el-api:jar:9.0.82:provided -[INFO] | | | +- org.apache.tomcat:tomcat-annotations-api:jar:9.0.82:provided -[INFO] | | | +- org.apache.tomcat:tomcat-api:jar:9.0.82:provided -[INFO] | | | \- org.apache.tomcat:tomcat-jaspic-api:jar:9.0.82:provided -[INFO] | | \- org.apache.tomcat:tomcat-util-scan:jar:9.0.82:provided -[INFO] | \- wsdl4j.wso2:wsdl4j:jar:1.6.2.wso2v4:provided -[INFO] +- org.wso2.carbon:org.wso2.carbon.registry.core:jar:4.9.23:provided -[INFO] | +- commons-io.wso2:commons-io:jar:2.11.0.wso2v1:provided -[INFO] | +- net.sourceforge.findbugs:annotations:jar:1.3.2:provided -[INFO] | +- org.apache.ws.commons.schema.wso2:XmlSchema:jar:1.4.7.wso2v6:provided -[INFO] | +- org.wso2.carbon:org.wso2.carbon.registry.xboot:jar:4.9.23:provided -[INFO] | +- org.compass-project.wso2:compass:jar:2.0.1.wso2v2:provided -[INFO] | +- org.apache.abdera.wso2:abdera:jar:1.0.0.wso2v3:provided -[INFO] | \- commons-pool.wso2:commons-pool:jar:1.5.6.wso2v1:provided -[INFO] | \- commons-pool:commons-pool:jar:1.5.6:provided -[INFO] +- org.wso2.orbit.org.opensaml:opensaml:jar:3.3.1.wso2v11:provided -[INFO] | +- commons-codec:commons-codec:jar:1.16.0:provided -[INFO] | \- org.cryptacular:cryptacular:jar:1.2.5:provided -[INFO] +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.action.execution:jar:7.3.75-SNAPSHOT:provided -[INFO] | \- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.action.management:jar:7.3.72:provided -[INFO] +- org.wso2.orbit.org.apache.oltu.oauth2:oltu:jar:1.0.0.wso2v3:provided -[INFO] +- org.wso2.carbon.identity.inbound.auth.oauth2:org.wso2.carbon.identity.oauth.common:jar:7.0.150-SNAPSHOT:provided -[INFO] +- org.wso2.carbon.identity.framework:org.wso2.carbon.idp.mgt:jar:7.3.72:provided -[INFO] | +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.role.mgt.core:jar:7.3.72:provided -[INFO] | \- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.secret.mgt.core:jar:7.3.72:provided -[INFO] +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.application.mgt:jar:7.3.72:provided -[INFO] | +- org.wso2.carbon.consent.mgt:org.wso2.carbon.consent.mgt.core:jar:2.2.16:provided -[INFO] | +- org.wso2.carbon.identity.framework:org.wso2.carbon.security.mgt:jar:7.3.72:provided -[INFO] | | \- backport-util-concurrent.wso2:backport-util-concurrent:jar:3.1.0.wso2v1:provided -[INFO] | +- org.wso2.carbon.identity.framework:org.wso2.carbon.user.mgt:jar:7.3.72:provided -[INFO] | | +- org.wso2.carbon.identity.framework:org.wso2.carbon.user.mgt.common:jar:7.3.72:provided -[INFO] | | +- au.com.bytecode.opencsv.wso2:opencsv:jar:1.8.wso2v1:provided -[INFO] | | +- org.wso2.orbit.org.apache.poi:poi-scratchpad:jar:5.2.3.wso2v1:provided -[INFO] | | | \- org.apache.poi:poi-scratchpad:jar:5.2.3:provided -[INFO] | | | +- org.apache.poi:poi:jar:5.2.3:provided -[INFO] | | | | +- org.apache.commons:commons-collections4:jar:4.4:provided -[INFO] | | | | \- com.zaxxer:SparseBitSet:jar:1.2:provided -[INFO] | | | +- org.apache.logging.log4j:log4j-api:jar:2.18.0:provided -[INFO] | | | \- org.apache.commons:commons-math3:jar:3.6.1:provided -[INFO] | | +- org.wso2.orbit.org.apache.poi:poi-ooxml:jar:5.2.3.wso2v1:provided -[INFO] | | +- org.ops4j.pax.logging:pax-logging-log4j2:jar:1.10.1:provided -[INFO] | | +- org.wso2.orbit.org.apache.commons:commons-compress:jar:1.25.0.wso2v1:provided -[INFO] | | \- org.wso2.orbit.org.apache.xmlbeans:xmlbeans:jar:5.1.1.wso2v1:provided -[INFO] | | \- org.apache.xmlbeans:xmlbeans:jar:5.1.1:provided -[INFO] | \- org.jacoco:org.jacoco.agent:jar:runtime:0.8.2:test -[INFO] +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.entitlement:jar:7.3.75-SNAPSHOT:provided -[INFO] | +- org.wso2.balana:org.wso2.balana:jar:1.2.13:provided -[INFO] | | \- org.wso2.balana:org.wso2.balana.utils:jar:1.2.13:provided -[INFO] | | \- xerces.wso2:xercesImpl:jar:2.8.1.wso2v2:provided -[INFO] | +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.authenticator.thrift:jar:7.3.75-SNAPSHOT:provided -[INFO] | | \- org.wso2.carbon:org.wso2.carbon.core.services:jar:4.10.10:provided -[INFO] | +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.entitlement.common:jar:7.3.75-SNAPSHOT:provided -[INFO] | | \- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.entitlement.stub:jar:7.3.75-SNAPSHOT:provided -[INFO] | | \- org.apache.axis2.wso2:axis2-client:jar:1.6.1-wso2v40:provided -[INFO] | | +- org.apache.axis2.wso2:axis2-json:jar:1.6.1-wso2v40:provided -[INFO] | | +- org.apache.woden.wso2:woden:jar:1.0.0.M8-wso2v1:provided -[INFO] | | \- commons-codec.wso2:commons-codec:jar:1.3.0.wso2v1:provided -[INFO] | +- libthrift.wso2:libthrift:jar:0.16.0.wso2v1:provided -[INFO] | | \- org.apache.thrift:libthrift:jar:0.16.0:provided -[INFO] | | +- org.apache.httpcomponents:httpclient:jar:4.5.13:provided -[INFO] | | \- org.apache.httpcomponents:httpcore:jar:4.4.15:provided -[INFO] | +- org.apache.santuario:xmlsec:jar:2.3.4:provided -[INFO] | \- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.notification.mgt:jar:7.3.75-SNAPSHOT:provided -[INFO] +- org.wso2.carbon.identity.saml.common:org.wso2.carbon.identity.saml.common.util:jar:1.4.0:provided -[INFO] | +- org.apache.ws.security.wso2:wss4j:jar:1.5.11-wso2v18:provided -[INFO] | \- com.google.guava:guava:jar:29.0-jre:provided -[INFO] | +- com.google.guava:failureaccess:jar:1.0.1:provided -[INFO] | +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:provided -[INFO] | +- org.checkerframework:checker-qual:jar:2.11.1:provided -[INFO] | +- com.google.errorprone:error_prone_annotations:jar:2.3.4:provided -[INFO] | \- com.google.j2objc:j2objc-annotations:jar:1.3:provided -[INFO] +- org.wso2.orbit.com.github.dblock.waffle:waffle-jna:jar:1.6.wso2v6:provided -[INFO] +- org.wso2.orbit.com.nimbusds:nimbus-jose-jwt:jar:7.9.0.wso2v1:provided -[INFO] +- net.minidev:json-smart:jar:2.4.10:provided -[INFO] | \- net.minidev:accessors-smart:jar:2.4.9:provided -[INFO] | \- org.ow2.asm:asm:jar:9.3:provided -[INFO] +- org.wso2.carbon:org.wso2.carbon.core.common:jar:4.9.23:provided -[INFO] +- javax.servlet:servlet-api:jar:2.5:provided -[INFO] +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.application.authentication.framework:jar:7.3.72:provided -[INFO] | +- org.wso2.carbon:org.wso2.carbon.ui:jar:4.10.10:provided -[INFO] | | +- org.apache.tiles.wso2:tiles-jsp:jar:2.0.5.wso2v2:provided -[INFO] | | +- org.wso2.carbon:org.wso2.carbon.authenticator.proxy:jar:4.10.10:provided -[INFO] | | | \- org.wso2.carbon:org.wso2.carbon.authenticator.stub:jar:4.10.10:provided -[INFO] | | +- org.wso2.carbon:org.wso2.carbon.tomcat:jar:4.10.10:provided -[INFO] | | | \- org.wso2.eclipse.equinox:org.eclipse.equinox.common:jar:3.8.0.v20160509-1230:provided -[INFO] | | +- org.eclipse.equinox:org.eclipse.equinox.http.servlet:jar:1.1.400.v20130418-1354:provided -[INFO] | | +- org.eclipse.equinox:javax.servlet.jsp:jar:2.2.0.v201112011158:provided -[INFO] | | +- org.wso2.carbon:org.wso2.carbon.core.commons.stub:jar:4.10.10:provided -[INFO] | | +- org.wso2.orbit.javax.servlet.jsp.jstl:jstl:jar:1.2.2.wso2v1:provided -[INFO] | | \- org.wso2.orbit.org.owasp.encoder:encoder:jar:1.2.0.wso2v1:provided -[INFO] | +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.user.profile:jar:7.3.72:provided -[INFO] | +- org.graalvm.sdk:graal-sdk:jar:22.3.4:provided -[INFO] | +- org.graalvm.js:js:jar:22.3.4:provided -[INFO] | +- org.graalvm.truffle:truffle-api:jar:22.3.4:provided -[INFO] | +- org.graalvm.regex:regex:jar:22.3.4:provided -[INFO] | +- com.ibm.icu:icu4j:jar:71.1:provided -[INFO] | +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.functions.library.mgt:jar:7.3.72:provided -[INFO] | \- org.wso2.carbon.identity.framework:org.wso2.carbon.claim.mgt:jar:7.3.72:provided -[INFO] +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.user.store.configuration:jar:7.3.72:provided -[INFO] | +- org.wso2.carbon:org.wso2.carbon.ndatasource.core:jar:4.10.10:provided -[INFO] | | \- org.wso2.carbon:org.wso2.carbon.ndatasource.common:jar:4.10.10:provided -[INFO] | \- org.wso2.carbon:org.wso2.carbon.ndatasource.rdbms:jar:4.10.10:provided -[INFO] +- org.wso2.orbit.joda-time:joda-time:jar:2.9.4.wso2v1:provided -[INFO] +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.claim.metadata.mgt:jar:7.3.72:provided -[INFO] +- org.wso2.carbon.identity.organization.management:org.wso2.carbon.identity.organization.management.role.management.service:jar:1.4.42:provided -[INFO] +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.consent.server.configs.mgt:jar:7.3.75-SNAPSHOT:provided -[INFO] +- org.wso2.carbon.identity.organization.management:org.wso2.carbon.identity.organization.management.organization.user.sharing:jar:1.4.7:provided -[INFO] +- org.wso2.eclipse.osgi:org.eclipse.osgi.services:jar:3.5.100.v20160504-1419:provided -[INFO] +- com.google.code.findbugs:annotations:jar:3.0.1:provided -[INFO] | \- net.jcip:jcip-annotations:jar:1.0:provided -[INFO] +- org.wso2.carbon.utils:org.wso2.carbon.database.utils:jar:2.0.11:provided -[INFO] | +- commons-dbcp:commons-dbcp:jar:1.4:provided -[INFO] | \- commons-lang:commons-lang:jar:2.6:provided -[INFO] +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.multi.attribute.login.mgt:jar:7.3.75-SNAPSHOT:provided -[INFO] +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.role.v2.mgt.core:jar:7.3.75-SNAPSHOT:provided -[INFO] +- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.cors.mgt.core:jar:7.3.72:provided -[INFO] \- org.wso2.carbon.identity.framework:org.wso2.carbon.identity.configuration.mgt.core:jar:7.3.72:provided -[INFO] \- org.eclipse.osgi:org.eclipse.osgi:jar:3.9.1.v20130814-1242:provided -[INFO] ------------------------------------------------------------------------ -[INFO] BUILD SUCCESS -[INFO] ------------------------------------------------------------------------ -[INFO] Total time: 5.687 s -[INFO] Finished at: 2024-10-02T17:27:05+05:30 -[INFO] ------------------------------------------------------------------------ diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/pom.xml index ccb4f336f4..4881e9f08b 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/pom.xml @@ -95,7 +95,6 @@ org.wso2.carbon.identity.framework org.wso2.carbon.identity.api.resource.mgt - 7.3.75-SNAPSHOT provided diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApi.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApi.java index 4d7b71bc4b..e84968850a 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApi.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApi.java @@ -294,7 +294,7 @@ public Response deleteAuthorizationDetailsType(@ApiParam(value = "ID of the API @Authorization(value = "OAuth2", scopes = { }) - }, tags={ "API Resources", }) + }, tags={ "API Resources" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = APIResourceListResponse.class), @ApiResponse(code = 401, message = "Unauthorized", response = Void.class), diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypesApiServiceFactory.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypesApiServiceFactory.java index 18cbd9ef8a..80a7b69fa2 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypesApiServiceFactory.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypesApiServiceFactory.java @@ -21,12 +21,14 @@ import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesApiService; import org.wso2.carbon.identity.api.server.api.resource.v1.impl.AuthorizationDetailsTypesApiServiceImpl; +/** + * Factory class for {@link AuthorizationDetailsTypesApiService}. + */ public class AuthorizationDetailsTypesApiServiceFactory { - private final static AuthorizationDetailsTypesApiService service = new AuthorizationDetailsTypesApiServiceImpl(); + private final static AuthorizationDetailsTypesApiService service = new AuthorizationDetailsTypesApiServiceImpl(); - public static AuthorizationDetailsTypesApiService getAuthorizationDetailsTypesApi() - { - return service; - } + public static AuthorizationDetailsTypesApiService getAuthorizationDetailsTypesApi() { + return service; + } } diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java index 58d8c2df49..54056cf726 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java @@ -117,7 +117,7 @@ public AuthorizationDetailsTypesGetModel getAuthorizationDetailsTypeById(String public List getAuthorizationDetailsTypes(String apiResourceId) { if (LOG.isDebugEnabled()) { - LOG.debug(String.format("Retrieving authorization details type against resource id: %s", apiResourceId)); + LOG.debug("Retrieving authorization details type against resource id: " + apiResourceId); } try { APIResource apiResource = APIResourceManagementServiceHolder.getApiResourceManager() @@ -184,7 +184,7 @@ public boolean isAuthorizationDetailsTypeIdExists(String apiResourceId, String a public boolean isAuthorizationDetailsTypeExists(String filter) { if (LOG.isDebugEnabled()) { - LOG.debug(String.format("Checking authorization details type exists against filter: %s", filter)); + LOG.debug("Checking authorization details type exists against filter: " + filter); } try { return APIResourceManagementServiceHolder @@ -200,7 +200,7 @@ public boolean isAuthorizationDetailsTypeExists(String filter) { public List getAllAuthorizationDetailsTypes(String filter) { if (LOG.isDebugEnabled()) { - LOG.debug(String.format("Retrieving all authorization details type against filter: %s", filter)); + LOG.debug("Retrieving all authorization details type against filter: " + filter); } try { List authorizationDetailsTypes = APIResourceManagementServiceHolder diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java index 88ceeb6659..9bbdcf4098 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2023-2024, 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 diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/ApiResourcesApiServiceImpl.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/ApiResourcesApiServiceImpl.java index f70f3a0db7..7dec360a66 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/ApiResourcesApiServiceImpl.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/ApiResourcesApiServiceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2023-2024, 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 diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java index 5f0db63489..cb7e38deda 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java @@ -100,8 +100,7 @@ public static AuthorizationDetailsType toAuthorizationDetailsType( * @return A JSON string of the validated schema. * @throws APIResourceMgtClientException if the schema is empty or invalid. */ - private static boolean isValidSchema(Map schema) - throws APIResourceMgtClientException { + private static boolean isValidSchema(Map schema) throws APIResourceMgtClientException { if (MapUtils.isEmpty(schema)) { throwAPIResourceMgtClientException("Schema is empty"); diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/pom.xml index 115ddb636a..6fc55c5639 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/pom.xml @@ -97,13 +97,11 @@ org.wso2.carbon.identity.framework org.wso2.carbon.identity.application.mgt - 7.3.75-SNAPSHOT provided org.wso2.carbon.identity.framework org.wso2.carbon.identity.application.common - 7.3.75-SNAPSHOT provided @@ -139,7 +137,6 @@ org.wso2.carbon.identity.framework org.wso2.carbon.identity.api.resource.mgt - 7.3.75-SNAPSHOT provided diff --git a/pom.xml b/pom.xml index 8e017456ea..2102b25e53 100644 --- a/pom.xml +++ b/pom.xml @@ -809,12 +809,14 @@ 1.4 1.2.4 1.11.11 - 7.5.84 + + 7.5.94-SNAPSHOT 3.0.5 1.12.0 **/gen/**/* 1.9.12 - 7.0.169 + + 7.0.177-SNAPSHOT 5.11.41 1.9.4 findbugs-exclude-filter.xml From 520a203b35a78dd21674469bb45a756d2ae3d36c Mon Sep 17 00:00:00 2001 From: vimukthiRajapaksha Date: Wed, 13 Nov 2024 14:43:52 +0530 Subject: [PATCH 07/13] Improves error descriptions --- ...orizationDetailsTypeManagementService.java | 61 ++++++++++--------- .../ServerAPIResourceManagementService.java | 5 +- .../util/AuthorizationDetailsTypeMgtUtil.java | 15 ++--- .../ServerApplicationManagementService.java | 4 +- pom.xml | 4 +- 5 files changed, 46 insertions(+), 43 deletions(-) diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java index 54056cf726..8f4e2a12d2 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java @@ -20,7 +20,6 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.identity.api.resource.mgt.APIResourceMgtException; import org.wso2.carbon.identity.api.server.api.resource.common.APIResourceManagementServiceHolder; import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesCreationModel; @@ -35,6 +34,8 @@ import javax.ws.rs.core.Response; +import static org.wso2.carbon.context.CarbonContext.getThreadLocalCarbonContext; +import static org.wso2.carbon.identity.api.server.api.resource.v1.util.AuthorizationDetailsTypeMgtUtil.toAuthorizationDetailsGetModels; import static org.wso2.carbon.identity.api.server.api.resource.v1.util.AuthorizationDetailsTypeMgtUtil.toAuthorizationDetailsType; /** @@ -45,23 +46,19 @@ public class AuthorizationDetailsTypeManagementService { private static final Log LOG = LogFactory.getLog(AuthorizationDetailsTypeManagementService.class); public List addAuthorizationDetailsTypes( - String apiResourceId, List creationModels) { + final String apiResourceId, final List creationModels) { if (LOG.isDebugEnabled()) { LOG.debug("Adding authorization details types to resource with id: " + apiResourceId); } + try { - APIResource apiResource = APIResourceManagementServiceHolder.getApiResourceManager() - .getAPIResourceById(apiResourceId, CarbonContext.getThreadLocalCarbonContext().getTenantDomain()); - if (apiResource == null) { - throw APIResourceMgtEndpointUtil.handleException(Response.Status.NOT_FOUND, - APIResourceMgtEndpointConstants.ErrorMessage.ERROR_CODE_API_RESOURCE_NOT_FOUND, apiResourceId); - } + this.assertApiResourceIdExistence(apiResourceId); return APIResourceManagementServiceHolder.getAuthorizationDetailsTypeManager().addAuthorizationDetailsTypes( apiResourceId, AuthorizationDetailsTypeMgtUtil.toAuthorizationDetailsTypesList(creationModels), - CarbonContext.getThreadLocalCarbonContext().getTenantDomain() + getThreadLocalCarbonContext().getTenantDomain() ); } catch (APIResourceMgtException e) { throw APIResourceMgtEndpointUtil.handleAPIResourceMgtException(e); @@ -79,7 +76,7 @@ public void deleteAuthorizationDetailsTypeById(String apiResourceId, String auth .deleteAuthorizationDetailsTypeByApiIdAndTypeId( apiResourceId, authorizationDetailsTypeId, - CarbonContext.getThreadLocalCarbonContext().getTenantDomain() + getThreadLocalCarbonContext().getTenantDomain() ); } catch (APIResourceMgtException e) { throw APIResourceMgtEndpointUtil.handleAPIResourceMgtException(e); @@ -99,7 +96,7 @@ public AuthorizationDetailsTypesGetModel getAuthorizationDetailsTypeById(String .getAuthorizationDetailsTypeByApiIdAndTypeId( apiResourceId, authorizationDetailsTypeId, - CarbonContext.getThreadLocalCarbonContext().getTenantDomain() + getThreadLocalCarbonContext().getTenantDomain() ); if (authorizationDetailsType == null) { throw APIResourceMgtEndpointUtil.handleException( @@ -120,15 +117,15 @@ public List getAuthorizationDetailsTypes(Stri LOG.debug("Retrieving authorization details type against resource id: " + apiResourceId); } try { - APIResource apiResource = APIResourceManagementServiceHolder.getApiResourceManager() - .getAPIResourceById(apiResourceId, CarbonContext.getThreadLocalCarbonContext().getTenantDomain()); + final APIResource apiResource = APIResourceManagementServiceHolder.getApiResourceManager() + .getAPIResourceById(apiResourceId, getThreadLocalCarbonContext().getTenantDomain()); + if (apiResource == null) { throw APIResourceMgtEndpointUtil.handleException(Response.Status.NOT_FOUND, APIResourceMgtEndpointConstants.ErrorMessage.ERROR_CODE_API_RESOURCE_NOT_FOUND, apiResourceId); } - return AuthorizationDetailsTypeMgtUtil. - toAuthorizationDetailsGetModelsList(apiResource.getAuthorizationDetailsTypes()); + return toAuthorizationDetailsGetModels(apiResource.getAuthorizationDetailsTypes()); } catch (APIResourceMgtException e) { throw APIResourceMgtEndpointUtil.handleAPIResourceMgtException(e); } @@ -142,12 +139,7 @@ public void updateAuthorizationDetailsTypes(String apiResourceId, String authori apiResourceId, authorizationDetailsTypeId)); } try { - APIResource apiResource = APIResourceManagementServiceHolder.getApiResourceManager() - .getAPIResourceById(apiResourceId, CarbonContext.getThreadLocalCarbonContext().getTenantDomain()); - if (apiResource == null) { - throw APIResourceMgtEndpointUtil.handleException(Response.Status.NOT_FOUND, - APIResourceMgtEndpointConstants.ErrorMessage.ERROR_CODE_API_RESOURCE_NOT_FOUND, apiResourceId); - } + this.assertApiResourceIdExistence(apiResourceId); if (!this.isAuthorizationDetailsTypeIdExists(apiResourceId, authorizationDetailsTypeId)) { throw APIResourceMgtEndpointUtil.handleException( @@ -160,7 +152,7 @@ public void updateAuthorizationDetailsTypes(String apiResourceId, String authori APIResourceManagementServiceHolder.getAuthorizationDetailsTypeManager().updateAuthorizationDetailsType( apiResourceId, toAuthorizationDetailsType(authorizationDetailsTypeId, creationModel), - CarbonContext.getThreadLocalCarbonContext().getTenantDomain() + getThreadLocalCarbonContext().getTenantDomain() ); } catch (APIResourceMgtException e) { throw APIResourceMgtEndpointUtil.handleAPIResourceMgtException(e); @@ -174,7 +166,7 @@ public boolean isAuthorizationDetailsTypeIdExists(String apiResourceId, String a .getAuthorizationDetailsTypeByApiIdAndTypeId( apiResourceId, authorizationDetailsTypeId, - CarbonContext.getThreadLocalCarbonContext().getTenantDomain() + getThreadLocalCarbonContext().getTenantDomain() ) != null; } catch (APIResourceMgtException e) { throw APIResourceMgtEndpointUtil.handleAPIResourceMgtException(e); @@ -190,28 +182,37 @@ public boolean isAuthorizationDetailsTypeExists(String filter) { return APIResourceManagementServiceHolder .getAuthorizationDetailsTypeManager() .isAuthorizationDetailsTypeExists( - filter, CarbonContext.getThreadLocalCarbonContext().getTenantDomain() + filter, getThreadLocalCarbonContext().getTenantDomain() ); } catch (APIResourceMgtException e) { throw APIResourceMgtEndpointUtil.handleAPIResourceMgtException(e); } } - public List getAllAuthorizationDetailsTypes(String filter) { + public List getAllAuthorizationDetailsTypes(final String filter) { if (LOG.isDebugEnabled()) { LOG.debug("Retrieving all authorization details type against filter: " + filter); } try { - List authorizationDetailsTypes = APIResourceManagementServiceHolder + final List authorizationDetailsTypes = APIResourceManagementServiceHolder .getAuthorizationDetailsTypeManager() - .getAuthorizationDetailsTypes( - filter, CarbonContext.getThreadLocalCarbonContext().getTenantDomain() - ); + .getAuthorizationDetailsTypes(filter, getThreadLocalCarbonContext().getTenantDomain()); - return AuthorizationDetailsTypeMgtUtil.toAuthorizationDetailsGetModelsList(authorizationDetailsTypes); + return toAuthorizationDetailsGetModels(authorizationDetailsTypes); } catch (APIResourceMgtException e) { throw APIResourceMgtEndpointUtil.handleAPIResourceMgtException(e); } } + + private void assertApiResourceIdExistence(final String apiResourceId) throws APIResourceMgtException { + + final APIResource apiResource = APIResourceManagementServiceHolder.getApiResourceManager() + .getAPIResourceById(apiResourceId, getThreadLocalCarbonContext().getTenantDomain()); + + if (apiResource == null) { + throw APIResourceMgtEndpointUtil.handleException(Response.Status.NOT_FOUND, + APIResourceMgtEndpointConstants.ErrorMessage.ERROR_CODE_API_RESOURCE_NOT_FOUND, apiResourceId); + } + } } diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java index 9bbdcf4098..75f5886ae1 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java @@ -60,7 +60,7 @@ import static org.wso2.carbon.identity.api.server.api.resource.v1.constants.APIResourceMgtEndpointConstants.ASC_SORT_ORDER; import static org.wso2.carbon.identity.api.server.api.resource.v1.constants.APIResourceMgtEndpointConstants.DEFAULT_LIMIT; import static org.wso2.carbon.identity.api.server.api.resource.v1.constants.APIResourceMgtEndpointConstants.DESC_SORT_ORDER; -import static org.wso2.carbon.identity.api.server.api.resource.v1.util.AuthorizationDetailsTypeMgtUtil.toAuthorizationDetailsGetModelsList; +import static org.wso2.carbon.identity.api.server.api.resource.v1.util.AuthorizationDetailsTypeMgtUtil.toAuthorizationDetailsGetModels; import static org.wso2.carbon.identity.api.server.api.resource.v1.util.AuthorizationDetailsTypeMgtUtil.toAuthorizationDetailsTypesList; import static org.wso2.carbon.identity.api.server.common.Constants.V1_API_PATH_COMPONENT; @@ -440,8 +440,7 @@ private APIResourceResponse buildAPIResourceResponse(APIResource apiResource) { .scopes(apiResource.getScopes().stream().map(this::buildScopeGetResponse) .collect(Collectors.toList())) .requiresAuthorization(apiResource.isAuthorizationRequired()) - .authorizationDetailsTypes( - toAuthorizationDetailsGetModelsList(apiResource.getAuthorizationDetailsTypes())) + .authorizationDetailsTypes(toAuthorizationDetailsGetModels(apiResource.getAuthorizationDetailsTypes())) .properties(apiResource.getProperties().stream().map(this::buildAPIResourceProperty) .collect(Collectors.toList())); } diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java index cb7e38deda..8a95954206 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java @@ -18,7 +18,6 @@ package org.wso2.carbon.identity.api.server.api.resource.v1.util; -import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.MapUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -45,12 +44,14 @@ public class AuthorizationDetailsTypeMgtUtil { private static final Log log = LogFactory.getLog(AuthorizationDetailsTypeMgtUtil.class); - public static List toAuthorizationDetailsGetModelsList( + public static List toAuthorizationDetailsGetModels( final List authorizationDetailsTypes) { - return CollectionUtils.isEmpty(authorizationDetailsTypes) ? Collections.emptyList() : - authorizationDetailsTypes.stream().map(AuthorizationDetailsTypeMgtUtil::toAuthorizationDetailsGetModel) - .collect(Collectors.toList()); + if (authorizationDetailsTypes == null) { + return Collections.emptyList(); + } + return authorizationDetailsTypes.stream().map(AuthorizationDetailsTypeMgtUtil::toAuthorizationDetailsGetModel) + .collect(Collectors.toList()); } public static AuthorizationDetailsTypesGetModel toAuthorizationDetailsGetModel( @@ -103,7 +104,7 @@ public static AuthorizationDetailsType toAuthorizationDetailsType( private static boolean isValidSchema(Map schema) throws APIResourceMgtClientException { if (MapUtils.isEmpty(schema)) { - throwAPIResourceMgtClientException("Schema is empty"); + throwAPIResourceMgtClientException("Authorization details schema cannot be empty."); } try { @@ -111,7 +112,7 @@ private static boolean isValidSchema(Map schema) throws APIResou return true; } - throwAPIResourceMgtClientException("Invalid schema"); + throwAPIResourceMgtClientException("Invalid authorization details schema received."); } catch (AuthorizationDetailsProcessingException e) { log.debug(ERROR_CODE_INVALID_AUTHORIZATION_DETAILS_SCHEMA.getMessage(), e); throwAPIResourceMgtClientException(e.getMessage()); diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/ServerApplicationManagementService.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/ServerApplicationManagementService.java index 85e0cb3c9b..582a42624b 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/ServerApplicationManagementService.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/ServerApplicationManagementService.java @@ -2100,9 +2100,11 @@ private void blockRenameAppsToSystemReservedApps(String newAppName, String oldAp private void validateAPIResourceAuthorizationDetailsTypes(APIResource apiResource, List requestedTypes) { - if (apiResource == null || CollectionUtils.isEmpty(apiResource.getAuthorizationDetailsTypes())) { + if (apiResource == null || CollectionUtils.isEmpty(apiResource.getAuthorizationDetailsTypes()) + || CollectionUtils.isEmpty(requestedTypes)) { return; } + final Set existingTypes = apiResource.getAuthorizationDetailsTypes().stream() .map(AuthorizationDetailsType::getType) .collect(Collectors.toSet()); diff --git a/pom.xml b/pom.xml index 56a54ad225..7718e54c94 100644 --- a/pom.xml +++ b/pom.xml @@ -809,12 +809,12 @@ 1.4 1.2.4 1.11.11 - 7.5.92 + 7.5.94-SNAPSHOT 3.0.5 1.12.0 **/gen/**/* 1.9.12 - 7.0.169 + 7.0.177-SNAPSHOT 5.11.44 1.9.4 findbugs-exclude-filter.xml From ff585ef5901888281447cb002829c646027f4e1d Mon Sep 17 00:00:00 2001 From: vimukthiRajapaksha Date: Wed, 13 Nov 2024 15:35:51 +0530 Subject: [PATCH 08/13] Adds missing JavaDoc comments --- ...orizationDetailsTypeManagementService.java | 54 +++++++++++++++++- .../ServerAPIResourceManagementService.java | 6 +- .../util/AuthorizationDetailsTypeMgtUtil.java | 55 +++++++++++++++---- 3 files changed, 101 insertions(+), 14 deletions(-) diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java index 8f4e2a12d2..7d7d2d576d 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java @@ -45,6 +45,13 @@ public class AuthorizationDetailsTypeManagementService { private static final Log LOG = LogFactory.getLog(AuthorizationDetailsTypeManagementService.class); + /** + * Adds a list of authorization details types to a specified API resource. + * + * @param apiResourceId The ID of the API resource. + * @param creationModels List of models containing the authorization details types to be added. + * @return A list of added {@link AuthorizationDetailsType} instances. + */ public List addAuthorizationDetailsTypes( final String apiResourceId, final List creationModels) { @@ -57,7 +64,7 @@ public List addAuthorizationDetailsTypes( return APIResourceManagementServiceHolder.getAuthorizationDetailsTypeManager().addAuthorizationDetailsTypes( apiResourceId, - AuthorizationDetailsTypeMgtUtil.toAuthorizationDetailsTypesList(creationModels), + AuthorizationDetailsTypeMgtUtil.toAuthorizationDetailsTypes(creationModels), getThreadLocalCarbonContext().getTenantDomain() ); } catch (APIResourceMgtException e) { @@ -65,6 +72,12 @@ public List addAuthorizationDetailsTypes( } } + /** + * Deletes a specific authorization details type by its ID for a given API resource ID. + * + * @param apiResourceId The ID of the API resource. + * @param authorizationDetailsTypeId The ID of the authorization details type to be deleted. + */ public void deleteAuthorizationDetailsTypeById(String apiResourceId, String authorizationDetailsTypeId) { if (LOG.isDebugEnabled()) { @@ -83,6 +96,13 @@ public void deleteAuthorizationDetailsTypeById(String apiResourceId, String auth } } + /** + * Retrieves a specific authorization details type by its ID for a given API resource ID. + * + * @param apiResourceId The ID of the API resource. + * @param authorizationDetailsTypeId The ID of the authorization details type to retrieve. + * @return An {@link AuthorizationDetailsTypesGetModel} containing the authorization details type. + */ public AuthorizationDetailsTypesGetModel getAuthorizationDetailsTypeById(String apiResourceId, String authorizationDetailsTypeId) { @@ -111,6 +131,12 @@ public AuthorizationDetailsTypesGetModel getAuthorizationDetailsTypeById(String } } + /** + * Retrieves a list of authorization details types by a given API resource ID. + * + * @param apiResourceId The ID of the API resource. + * @return A list of {@link AuthorizationDetailsTypesGetModel} containing the authorization details types. + */ public List getAuthorizationDetailsTypes(String apiResourceId) { if (LOG.isDebugEnabled()) { @@ -131,6 +157,13 @@ public List getAuthorizationDetailsTypes(Stri } } + /** + * Updates the authorization details type for a specified API resource. + * + * @param apiResourceId The ID of the API resource. + * @param authorizationDetailsTypeId The ID of the authorization details type to update. + * @param creationModel The authorization details types to be updated. + */ public void updateAuthorizationDetailsTypes(String apiResourceId, String authorizationDetailsTypeId, AuthorizationDetailsTypesCreationModel creationModel) { @@ -159,6 +192,13 @@ public void updateAuthorizationDetailsTypes(String apiResourceId, String authori } } + /** + * Checks if the specified authorization details type exists for a given type ID and API resource ID. + * + * @param apiResourceId The ID of the API resource. + * @param authorizationDetailsTypeId The ID of the authorization details type to check. + * @return {@code true} if the authorization details type exists, {@code false} otherwise. + */ public boolean isAuthorizationDetailsTypeIdExists(String apiResourceId, String authorizationDetailsTypeId) { try { @@ -173,6 +213,12 @@ public boolean isAuthorizationDetailsTypeIdExists(String apiResourceId, String a } } + /** + * Checks if an authorization details type exists based on a filter. + * + * @param filter The filter string to match authorization details types. + * @return {@code true} if at least one authorization details type matches the filter, {@code false} otherwise. + */ public boolean isAuthorizationDetailsTypeExists(String filter) { if (LOG.isDebugEnabled()) { @@ -189,6 +235,12 @@ filter, getThreadLocalCarbonContext().getTenantDomain() } } + /** + * Retrieves all authorization details types that match a specific filter. + * + * @param filter The filter string to retrieve matching authorization details types. + * @return A list of {@link AuthorizationDetailsTypesGetModel} objects that match the filter. + */ public List getAllAuthorizationDetailsTypes(final String filter) { if (LOG.isDebugEnabled()) { diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java index 75f5886ae1..7d025dcd28 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java @@ -61,7 +61,7 @@ import static org.wso2.carbon.identity.api.server.api.resource.v1.constants.APIResourceMgtEndpointConstants.DEFAULT_LIMIT; import static org.wso2.carbon.identity.api.server.api.resource.v1.constants.APIResourceMgtEndpointConstants.DESC_SORT_ORDER; import static org.wso2.carbon.identity.api.server.api.resource.v1.util.AuthorizationDetailsTypeMgtUtil.toAuthorizationDetailsGetModels; -import static org.wso2.carbon.identity.api.server.api.resource.v1.util.AuthorizationDetailsTypeMgtUtil.toAuthorizationDetailsTypesList; +import static org.wso2.carbon.identity.api.server.api.resource.v1.util.AuthorizationDetailsTypeMgtUtil.toAuthorizationDetailsTypes; import static org.wso2.carbon.identity.api.server.common.Constants.V1_API_PATH_COMPONENT; /** @@ -254,7 +254,7 @@ public void patchAPIResourceById(String apiResourceID, APIResourcePatchModel api APIResourceManagementServiceHolder.getAuthorizationDetailsTypeManager() .replaceAuthorizationDetailsTypes(apiResourceID, apiResourcePatchModel.getRemovedAuthorizationDetailsTypes(), - toAuthorizationDetailsTypesList(apiResourcePatchModel.getAddedAuthorizationDetailsTypes()), + toAuthorizationDetailsTypes(apiResourcePatchModel.getAddedAuthorizationDetailsTypes()), CarbonContext.getThreadLocalCarbonContext().getTenantDomain() ); } catch (APIResourceMgtException e) { @@ -491,7 +491,7 @@ private APIResource createAPIResource(APIResourceCreationModel apIResourceCreati .requiresAuthorization(apIResourceCreationModel.getRequiresAuthorization() != null ? apIResourceCreationModel.getRequiresAuthorization() : true) .authorizationDetailsTypes( - toAuthorizationDetailsTypesList(apIResourceCreationModel.getAuthorizationDetailsTypes())) + toAuthorizationDetailsTypes(apIResourceCreationModel.getAuthorizationDetailsTypes())) .type(APIResourceMgtEndpointConstants.BUSINESS_API_RESOURCE_TYPE); return apiResourceBuilder.build(); } diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java index 8a95954206..829d0e7d15 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java @@ -44,6 +44,12 @@ public class AuthorizationDetailsTypeMgtUtil { private static final Log log = LogFactory.getLog(AuthorizationDetailsTypeMgtUtil.class); + /** + * Converts a list of {@link AuthorizationDetailsType} to a list of {@link AuthorizationDetailsTypesGetModel}. + * + * @param authorizationDetailsTypes The list of {@link AuthorizationDetailsType} objects to convert. + * @return A list of {@link AuthorizationDetailsTypesGetModel} objects, or an empty list if the input is null. + */ public static List toAuthorizationDetailsGetModels( final List authorizationDetailsTypes) { @@ -54,6 +60,12 @@ public static List toAuthorizationDetailsGetM .collect(Collectors.toList()); } + /** + * Converts a {@link AuthorizationDetailsType} to a {@link AuthorizationDetailsTypesGetModel}. + * + * @param authorizationDetailsType The {@link AuthorizationDetailsType} object to convert. + * @return A {@link AuthorizationDetailsTypesGetModel} object. + */ public static AuthorizationDetailsTypesGetModel toAuthorizationDetailsGetModel( final AuthorizationDetailsType authorizationDetailsType) { @@ -65,7 +77,13 @@ public static AuthorizationDetailsTypesGetModel toAuthorizationDetailsGetModel( .schema(authorizationDetailsType.getSchema()); } - public static List toAuthorizationDetailsTypesList( + /** + * Converts a list of {@link AuthorizationDetailsTypesCreationModel} to a list of {@link AuthorizationDetailsType}. + * + * @param creationModels The list of {@link AuthorizationDetailsTypesCreationModel} objects to convert. + * @return A list of {@link AuthorizationDetailsType} objects, or an empty list if the input is null. + */ + public static List toAuthorizationDetailsTypes( final List creationModels) throws APIResourceMgtClientException { if (creationModels == null) { @@ -79,6 +97,12 @@ public static List toAuthorizationDetailsTypesList( return authorizationDetailsTypes; } + /** + * Converts a {@link AuthorizationDetailsTypesCreationModel} to a {@link AuthorizationDetailsType}. + * + * @param creationModel The {@link AuthorizationDetailsTypesCreationModel} object to convert. + * @return A {@link AuthorizationDetailsType} object. + */ public static AuthorizationDetailsType toAuthorizationDetailsType( final AuthorizationDetailsTypesCreationModel creationModel) throws APIResourceMgtClientException { @@ -94,6 +118,22 @@ public static AuthorizationDetailsType toAuthorizationDetailsType( return authorizationDetailsType; } + /** + * Converts a {@link AuthorizationDetailsTypesCreationModel} to a {@link AuthorizationDetailsType}. + * + * @param authorizationDetailsTypeId The authorization details type ID. + * @param creationModel The {@link AuthorizationDetailsTypesCreationModel} object to convert. + * @return A {@link AuthorizationDetailsType} object. + */ + public static AuthorizationDetailsType toAuthorizationDetailsType( + String authorizationDetailsTypeId, AuthorizationDetailsTypesCreationModel creationModel) + throws APIResourceMgtClientException { + + final AuthorizationDetailsType authorizationDetailsType = toAuthorizationDetailsType(creationModel); + authorizationDetailsType.setId(authorizationDetailsTypeId); + return authorizationDetailsType; + } + /** * Validates and creates a JSON schema from the given input map. * @@ -120,15 +160,6 @@ private static boolean isValidSchema(Map schema) throws APIResou return false; } - public static AuthorizationDetailsType toAuthorizationDetailsType( - String authorizationDetailsTypeId, AuthorizationDetailsTypesCreationModel creationModel) - throws APIResourceMgtClientException { - - final AuthorizationDetailsType authorizationDetailsType = toAuthorizationDetailsType(creationModel); - authorizationDetailsType.setId(authorizationDetailsTypeId); - return authorizationDetailsType; - } - private static void throwAPIResourceMgtClientException(final String message) throws APIResourceMgtClientException { throw new APIResourceMgtClientException( @@ -136,4 +167,8 @@ private static void throwAPIResourceMgtClientException(final String message) thr String.format(ERROR_CODE_INVALID_AUTHORIZATION_DETAILS_SCHEMA.getDescription(), message), ERROR_CODE_INVALID_AUTHORIZATION_DETAILS_SCHEMA.getCode()); } + + private AuthorizationDetailsTypeMgtUtil() { + // Adding a private constructor to hide the implicit public one. + } } From 37bda4f8a3b3dc3d79c827c382daf224de5c7e6e Mon Sep 17 00:00:00 2001 From: vimukthiRajapaksha Date: Thu, 16 Jan 2025 17:12:33 +0530 Subject: [PATCH 09/13] rename replaceAuthorizationDetailsTypes to updateAuthorizationDetailsTypes --- .../resource/v1/core/ServerAPIResourceManagementService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java index 7d025dcd28..cf6cc3065e 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java @@ -252,7 +252,7 @@ public void patchAPIResourceById(String apiResourceID, APIResourcePatchModel api removedScopeNames, CarbonContext.getThreadLocalCarbonContext().getTenantDomain()); // Replacing Authorization Details Types APIResourceManagementServiceHolder.getAuthorizationDetailsTypeManager() - .replaceAuthorizationDetailsTypes(apiResourceID, + .updateAuthorizationDetailsTypes(apiResourceID, apiResourcePatchModel.getRemovedAuthorizationDetailsTypes(), toAuthorizationDetailsTypes(apiResourcePatchModel.getAddedAuthorizationDetailsTypes()), CarbonContext.getThreadLocalCarbonContext().getTenantDomain() From 9eb900c209b0bfd0f3d3320430d7b0da22ceb153 Mon Sep 17 00:00:00 2001 From: vimukthiRajapaksha Date: Fri, 24 Jan 2025 11:26:19 +0530 Subject: [PATCH 10/13] Accept RAR as an OSGi component --- .../pom.xml | 5 ++ .../APIResourceManagementServiceHolder.java | 23 +++++++++ ...ailsSchemaValidatorOSGiServiceFactory.java | 51 +++++++++++++++++++ ...ationDetailsTypeMgtOSGiServiceFactory.java | 2 +- .../pom.xml | 5 ++ .../util/AuthorizationDetailsTypeMgtUtil.java | 7 +-- .../cxf/api-resource-server-v1-cxf.xml | 4 ++ pom.xml | 10 +++- ~ | 6 +++ 9 files changed, 107 insertions(+), 6 deletions(-) create mode 100644 components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/factory/AuthorizationDetailsSchemaValidatorOSGiServiceFactory.java create mode 100644 ~ diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/pom.xml b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/pom.xml index 72bc1ac9df..f33552a515 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/pom.xml @@ -73,5 +73,10 @@ org.wso2.carbon.identity.api.resource.collection.mgt provided + + org.wso2.carbon.identity.inbound.auth.oauth2 + org.wso2.carbon.identity.oauth.rar + provided + diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/APIResourceManagementServiceHolder.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/APIResourceManagementServiceHolder.java index ea66113d05..c4b4e46ee5 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/APIResourceManagementServiceHolder.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/APIResourceManagementServiceHolder.java @@ -22,6 +22,7 @@ import org.wso2.carbon.identity.api.resource.mgt.APIResourceManager; import org.wso2.carbon.identity.api.resource.mgt.AuthorizationDetailsTypeManager; import org.wso2.carbon.identity.oauth.OAuthAdminServiceImpl; +import org.wso2.carbon.identity.oauth.rar.core.AuthorizationDetailsSchemaValidator; /** * Service holder class for api resource management. @@ -32,6 +33,7 @@ public class APIResourceManagementServiceHolder { private static APIResourceCollectionManager apiResourceCollectionManager; private static OAuthAdminServiceImpl oAuthAdminServiceImpl; private static AuthorizationDetailsTypeManager authorizationDetailsTypeManager; + private static AuthorizationDetailsSchemaValidator authorizationDetailsSchemaValidator; /** * Get APIResourceManager osgi service. @@ -113,4 +115,25 @@ public static void setAuthorizationDetailsTypeManager( APIResourceManagementServiceHolder.authorizationDetailsTypeManager = authorizationDetailsTypeManager; } + + /** + * Set {@link AuthorizationDetailsSchemaValidator} instance. + * + * @return AuthorizationDetailsSchemaValidator instance. + */ + public static AuthorizationDetailsSchemaValidator getAuthorizationDetailsSchemaValidator() { + + return authorizationDetailsSchemaValidator; + } + + /** + * Set {@link AuthorizationDetailsSchemaValidator} instance. + * + * @param authorizationDetailsSchemaValidator AuthorizationDetailsSchemaValidator instance. + */ + public static void setAuthorizationDetailsSchemaValidator( + AuthorizationDetailsSchemaValidator authorizationDetailsSchemaValidator) { + + APIResourceManagementServiceHolder.authorizationDetailsSchemaValidator = authorizationDetailsSchemaValidator; + } } diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/factory/AuthorizationDetailsSchemaValidatorOSGiServiceFactory.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/factory/AuthorizationDetailsSchemaValidatorOSGiServiceFactory.java new file mode 100644 index 0000000000..26b270dea4 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/factory/AuthorizationDetailsSchemaValidatorOSGiServiceFactory.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2025, 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.carbon.identity.api.server.api.resource.common.factory; + +import org.springframework.beans.factory.config.AbstractFactoryBean; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.identity.oauth.rar.core.AuthorizationDetailsSchemaValidator; + +/** + * Factory class for {@link AuthorizationDetailsSchemaValidator}. + */ +public class AuthorizationDetailsSchemaValidatorOSGiServiceFactory extends + AbstractFactoryBean { + + private AuthorizationDetailsSchemaValidator authorizationDetailsSchemaValidator; + + @Override + public Class getObjectType() { + + return Object.class; + } + + @Override + protected AuthorizationDetailsSchemaValidator createInstance() throws Exception { + + if (this.authorizationDetailsSchemaValidator == null) { + this.authorizationDetailsSchemaValidator = (AuthorizationDetailsSchemaValidator) PrivilegedCarbonContext. + getThreadLocalCarbonContext().getOSGiService(AuthorizationDetailsSchemaValidator.class, null); + if (this.authorizationDetailsSchemaValidator == null) { + throw new Exception("Unable to retrieve AuthorizationDetailsSchemaValidator service."); + } + } + return this.authorizationDetailsSchemaValidator; + } +} diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/factory/AuthorizationDetailsTypeMgtOSGiServiceFactory.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/factory/AuthorizationDetailsTypeMgtOSGiServiceFactory.java index c3a5b71100..ad05b2427a 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/factory/AuthorizationDetailsTypeMgtOSGiServiceFactory.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.common/src/main/java/org/wso2/carbon/identity/api/server/api/resource/common/factory/AuthorizationDetailsTypeMgtOSGiServiceFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2025, 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 diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/pom.xml index 0e9801a3c0..a49edc1cf8 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/pom.xml +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/pom.xml @@ -125,6 +125,11 @@ org.wso2.carbon.identity.oauth provided + + org.wso2.carbon.identity.inbound.auth.oauth2 + org.wso2.carbon.identity.oauth.rar + provided + diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java index 829d0e7d15..00e591a7c1 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/util/AuthorizationDetailsTypeMgtUtil.java @@ -23,11 +23,11 @@ import org.apache.commons.logging.LogFactory; import org.json.JSONObject; import org.wso2.carbon.identity.api.resource.mgt.APIResourceMgtClientException; +import org.wso2.carbon.identity.api.server.api.resource.common.APIResourceManagementServiceHolder; import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesCreationModel; import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesGetModel; import org.wso2.carbon.identity.application.common.model.AuthorizationDetailsType; -import org.wso2.carbon.identity.oauth2.rar.AuthorizationDetailsSchemaValidator; -import org.wso2.carbon.identity.oauth2.rar.exception.AuthorizationDetailsProcessingException; +import org.wso2.carbon.identity.oauth.rar.exception.AuthorizationDetailsProcessingException; import java.util.ArrayList; import java.util.Collections; @@ -148,7 +148,8 @@ private static boolean isValidSchema(Map schema) throws APIResou } try { - if (AuthorizationDetailsSchemaValidator.getInstance().isValidSchema(new JSONObject(schema).toString())) { + if (APIResourceManagementServiceHolder.getAuthorizationDetailsSchemaValidator() + .isValidSchema(new JSONObject(schema).toString())) { return true; } diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/resources/META-INF/cxf/api-resource-server-v1-cxf.xml b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/resources/META-INF/cxf/api-resource-server-v1-cxf.xml index 60c594a645..049407f406 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/resources/META-INF/cxf/api-resource-server-v1-cxf.xml +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/resources/META-INF/cxf/api-resource-server-v1-cxf.xml @@ -34,6 +34,7 @@ + + + diff --git a/pom.xml b/pom.xml index 6d5d17e75f..8665bdd3d5 100644 --- a/pom.xml +++ b/pom.xml @@ -670,6 +670,12 @@ ${project.version} provided + + org.wso2.carbon.identity.inbound.auth.oauth2 + org.wso2.carbon.identity.oauth.rar + ${identity.inbound.oauth2.version} + provided + org.apache.felix org.apache.felix.scr.ds-annotations @@ -821,12 +827,12 @@ 1.4 1.2.4 1.11.21 - 7.7.95 + 7.7.128 3.0.5 1.12.0 **/gen/**/* 1.9.28 - 7.0.169 + 7.0.220 5.11.44 1.9.4 findbugs-exclude-filter.xml diff --git a/~ b/~ new file mode 100644 index 0000000000..9dc43d74af --- /dev/null +++ b/~ @@ -0,0 +1,6 @@ +Merge remote-tracking branch 'upstream/master' +# Please enter a commit message to explain why this merge is necessary, +# especially if it merges an updated upstream into a topic branch. +# +# Lines starting with '#' will be ignored, and an empty message aborts +# the commit. From dd6fd5ce71936f11eaf83f9bed25d32f83ecd086 Mon Sep 17 00:00:00 2001 From: vimukthiRajapaksha Date: Fri, 24 Jan 2025 13:47:36 +0530 Subject: [PATCH 11/13] Resolve authorization details services using OSGi --- .../v1/AuthorizationDetailsTypesApi.java | 12 ++-- ...orizationDetailsTypeManagementService.java | 53 ++++++++-------- .../ServerAPIResourceManagementService.java | 1 + ...onDetailsTypeManagementServiceFactory.java | 61 +++++++++++++++++++ .../v1/impl/ApiResourcesApiServiceImpl.java | 9 +-- ...thorizationDetailsTypesApiServiceImpl.java | 17 ++++-- .../cxf/api-resource-server-v1-cxf.xml | 0 7 files changed, 117 insertions(+), 36 deletions(-) create mode 100644 components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypeManagementServiceFactory.java delete mode 100644 components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/resources/META-INF/cxf/api-resource-server-v1-cxf.xml diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesApi.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesApi.java index d7f5da4a9b..f7a164c74c 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesApi.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesApi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2025, 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 @@ -18,7 +18,6 @@ package org.wso2.carbon.identity.api.server.api.resource.v1; -import org.springframework.beans.factory.annotation.Autowired; import org.apache.cxf.jaxrs.ext.multipart.Attachment; import org.apache.cxf.jaxrs.ext.multipart.Multipart; import java.io.InputStream; @@ -32,6 +31,7 @@ import javax.ws.rs.*; import javax.ws.rs.core.Response; import io.swagger.annotations.*; +import org.wso2.carbon.identity.api.server.api.resource.v1.factories.AuthorizationDetailsTypesApiServiceFactory; import javax.validation.constraints.*; @@ -40,8 +40,12 @@ public class AuthorizationDetailsTypesApi { - @Autowired - private AuthorizationDetailsTypesApiService delegate; + private final AuthorizationDetailsTypesApiService delegate; + + public AuthorizationDetailsTypesApi() { + + this.delegate = AuthorizationDetailsTypesApiServiceFactory.getAuthorizationDetailsTypesApi(); + } @Valid @GET diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java index 7d7d2d576d..cf57ed97ce 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/AuthorizationDetailsTypeManagementService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2025, 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 @@ -20,8 +20,9 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.identity.api.resource.mgt.APIResourceManager; import org.wso2.carbon.identity.api.resource.mgt.APIResourceMgtException; -import org.wso2.carbon.identity.api.server.api.resource.common.APIResourceManagementServiceHolder; +import org.wso2.carbon.identity.api.resource.mgt.AuthorizationDetailsTypeManager; import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesCreationModel; import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesGetModel; import org.wso2.carbon.identity.api.server.api.resource.v1.constants.APIResourceMgtEndpointConstants; @@ -44,6 +45,15 @@ public class AuthorizationDetailsTypeManagementService { private static final Log LOG = LogFactory.getLog(AuthorizationDetailsTypeManagementService.class); + private final AuthorizationDetailsTypeManager authorizationDetailsTypeManager; + private final APIResourceManager apiResourceManager; + + public AuthorizationDetailsTypeManagementService(APIResourceManager apiResourceManager, + AuthorizationDetailsTypeManager authorizationDetailsTypeManager) { + + this.apiResourceManager = apiResourceManager; + this.authorizationDetailsTypeManager = authorizationDetailsTypeManager; + } /** * Adds a list of authorization details types to a specified API resource. @@ -62,7 +72,7 @@ public List addAuthorizationDetailsTypes( try { this.assertApiResourceIdExistence(apiResourceId); - return APIResourceManagementServiceHolder.getAuthorizationDetailsTypeManager().addAuthorizationDetailsTypes( + return this.authorizationDetailsTypeManager.addAuthorizationDetailsTypes( apiResourceId, AuthorizationDetailsTypeMgtUtil.toAuthorizationDetailsTypes(creationModels), getThreadLocalCarbonContext().getTenantDomain() @@ -85,12 +95,11 @@ public void deleteAuthorizationDetailsTypeById(String apiResourceId, String auth apiResourceId, authorizationDetailsTypeId)); } try { - APIResourceManagementServiceHolder.getAuthorizationDetailsTypeManager() - .deleteAuthorizationDetailsTypeByApiIdAndTypeId( - apiResourceId, - authorizationDetailsTypeId, - getThreadLocalCarbonContext().getTenantDomain() - ); + this.authorizationDetailsTypeManager.deleteAuthorizationDetailsTypeByApiIdAndTypeId( + apiResourceId, + authorizationDetailsTypeId, + getThreadLocalCarbonContext().getTenantDomain() + ); } catch (APIResourceMgtException e) { throw APIResourceMgtEndpointUtil.handleAPIResourceMgtException(e); } @@ -111,8 +120,7 @@ public AuthorizationDetailsTypesGetModel getAuthorizationDetailsTypeById(String apiResourceId, authorizationDetailsTypeId)); } try { - AuthorizationDetailsType authorizationDetailsType = APIResourceManagementServiceHolder - .getAuthorizationDetailsTypeManager() + AuthorizationDetailsType authorizationDetailsType = this.authorizationDetailsTypeManager .getAuthorizationDetailsTypeByApiIdAndTypeId( apiResourceId, authorizationDetailsTypeId, @@ -143,7 +151,7 @@ public List getAuthorizationDetailsTypes(Stri LOG.debug("Retrieving authorization details type against resource id: " + apiResourceId); } try { - final APIResource apiResource = APIResourceManagementServiceHolder.getApiResourceManager() + final APIResource apiResource = this.apiResourceManager .getAPIResourceById(apiResourceId, getThreadLocalCarbonContext().getTenantDomain()); if (apiResource == null) { @@ -182,7 +190,7 @@ public void updateAuthorizationDetailsTypes(String apiResourceId, String authori ); } - APIResourceManagementServiceHolder.getAuthorizationDetailsTypeManager().updateAuthorizationDetailsType( + this.authorizationDetailsTypeManager.updateAuthorizationDetailsType( apiResourceId, toAuthorizationDetailsType(authorizationDetailsTypeId, creationModel), getThreadLocalCarbonContext().getTenantDomain() @@ -202,12 +210,11 @@ public void updateAuthorizationDetailsTypes(String apiResourceId, String authori public boolean isAuthorizationDetailsTypeIdExists(String apiResourceId, String authorizationDetailsTypeId) { try { - return APIResourceManagementServiceHolder.getAuthorizationDetailsTypeManager() - .getAuthorizationDetailsTypeByApiIdAndTypeId( - apiResourceId, - authorizationDetailsTypeId, - getThreadLocalCarbonContext().getTenantDomain() - ) != null; + return this.authorizationDetailsTypeManager.getAuthorizationDetailsTypeByApiIdAndTypeId( + apiResourceId, + authorizationDetailsTypeId, + getThreadLocalCarbonContext().getTenantDomain() + ) != null; } catch (APIResourceMgtException e) { throw APIResourceMgtEndpointUtil.handleAPIResourceMgtException(e); } @@ -225,8 +232,7 @@ public boolean isAuthorizationDetailsTypeExists(String filter) { LOG.debug("Checking authorization details type exists against filter: " + filter); } try { - return APIResourceManagementServiceHolder - .getAuthorizationDetailsTypeManager() + return this.authorizationDetailsTypeManager .isAuthorizationDetailsTypeExists( filter, getThreadLocalCarbonContext().getTenantDomain() ); @@ -247,8 +253,7 @@ public List getAllAuthorizationDetailsTypes(f LOG.debug("Retrieving all authorization details type against filter: " + filter); } try { - final List authorizationDetailsTypes = APIResourceManagementServiceHolder - .getAuthorizationDetailsTypeManager() + final List authorizationDetailsTypes = this.authorizationDetailsTypeManager .getAuthorizationDetailsTypes(filter, getThreadLocalCarbonContext().getTenantDomain()); return toAuthorizationDetailsGetModels(authorizationDetailsTypes); @@ -259,7 +264,7 @@ public List getAllAuthorizationDetailsTypes(f private void assertApiResourceIdExistence(final String apiResourceId) throws APIResourceMgtException { - final APIResource apiResource = APIResourceManagementServiceHolder.getApiResourceManager() + final APIResource apiResource = this.apiResourceManager .getAPIResourceById(apiResourceId, getThreadLocalCarbonContext().getTenantDomain()); if (apiResource == null) { diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java index a22fe3d301..d455412c0e 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java @@ -26,6 +26,7 @@ import org.wso2.carbon.identity.api.resource.mgt.APIResourceManager; import org.wso2.carbon.identity.api.resource.mgt.APIResourceMgtException; import org.wso2.carbon.identity.api.resource.mgt.model.APIResourceSearchResult; +import org.wso2.carbon.identity.api.server.api.resource.common.APIResourceManagementServiceHolder; import org.wso2.carbon.identity.api.server.api.resource.v1.APIResourceCreationModel; import org.wso2.carbon.identity.api.server.api.resource.v1.APIResourceListItem; import org.wso2.carbon.identity.api.server.api.resource.v1.APIResourceListResponse; diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypeManagementServiceFactory.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypeManagementServiceFactory.java new file mode 100644 index 0000000000..6412fc753b --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypeManagementServiceFactory.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2025, 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.carbon.identity.api.server.api.resource.v1.factories; + +import org.wso2.carbon.identity.api.resource.mgt.APIResourceManager; +import org.wso2.carbon.identity.api.resource.mgt.AuthorizationDetailsTypeManager; +import org.wso2.carbon.identity.api.server.api.resource.common.APIResourceManagementServiceHolder; +import org.wso2.carbon.identity.api.server.api.resource.v1.core.AuthorizationDetailsTypeManagementService; + +/** + * Factory class for ServerAPIResourceManagementService. + */ +public class AuthorizationDetailsTypeManagementServiceFactory { + + private static final AuthorizationDetailsTypeManagementService SERVICE; + + static { + + final AuthorizationDetailsTypeManager authorizationDetailsTypeManager = + APIResourceManagementServiceHolder.getAuthorizationDetailsTypeManager(); + + if (authorizationDetailsTypeManager == null) { + throw new IllegalStateException("AuthorizationDetailsTypeManager is not available from OSGi context."); + } + + final APIResourceManager apiResourceManager = APIResourceManagementServiceHolder.getApiResourceManager(); + + if (apiResourceManager == null) { + throw new IllegalStateException("APIResourceManager is not available from OSGi context."); + } + + SERVICE = new AuthorizationDetailsTypeManagementService(apiResourceManager, authorizationDetailsTypeManager); + } + + /** + * Get AuthorizationDetailsTypeManagementService instance. + * + * @return AuthorizationDetailsTypeManagementService. + */ + public static AuthorizationDetailsTypeManagementService getAuthorizationDetailsTypeManagementService() { + + return SERVICE; + } + +} diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/ApiResourcesApiServiceImpl.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/ApiResourcesApiServiceImpl.java index 5a5a28a1a1..9b6b58d013 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/ApiResourcesApiServiceImpl.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/ApiResourcesApiServiceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2023-2025, 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 @@ -28,6 +28,7 @@ import org.wso2.carbon.identity.api.server.api.resource.v1.constants.APIResourceMgtEndpointConstants; import org.wso2.carbon.identity.api.server.api.resource.v1.core.AuthorizationDetailsTypeManagementService; import org.wso2.carbon.identity.api.server.api.resource.v1.core.ServerAPIResourceManagementService; +import org.wso2.carbon.identity.api.server.api.resource.v1.factories.AuthorizationDetailsTypeManagementServiceFactory; import org.wso2.carbon.identity.api.server.api.resource.v1.factories.ServerAPIResourceManagementServiceFactory; import org.wso2.carbon.identity.api.server.common.ContextLoader; import org.wso2.carbon.identity.application.common.model.AuthorizationDetailsType; @@ -45,20 +46,20 @@ public class ApiResourcesApiServiceImpl implements ApiResourcesApiService { private final ServerAPIResourceManagementService serverAPIResourceManagementService; + private final AuthorizationDetailsTypeManagementService typeMgtService; public ApiResourcesApiServiceImpl() { try { this.serverAPIResourceManagementService = ServerAPIResourceManagementServiceFactory .getServerAPIResourceManagementService(); + this.typeMgtService = AuthorizationDetailsTypeManagementServiceFactory + .getAuthorizationDetailsTypeManagementService(); } catch (IllegalStateException e) { throw new RuntimeException("Error occurred while initiating API resource management service.", e); } } - @Autowired - AuthorizationDetailsTypeManagementService typeMgtService; - @Override public Response addAPIResource(APIResourceCreationModel apIResourceCreationModel) { diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/AuthorizationDetailsTypesApiServiceImpl.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/AuthorizationDetailsTypesApiServiceImpl.java index dd1f3e8e44..ff30b2e6b3 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/AuthorizationDetailsTypesApiServiceImpl.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/impl/AuthorizationDetailsTypesApiServiceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2025, 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 @@ -18,9 +18,9 @@ package org.wso2.carbon.identity.api.server.api.resource.v1.impl; -import org.springframework.beans.factory.annotation.Autowired; import org.wso2.carbon.identity.api.server.api.resource.v1.AuthorizationDetailsTypesApiService; import org.wso2.carbon.identity.api.server.api.resource.v1.core.AuthorizationDetailsTypeManagementService; +import org.wso2.carbon.identity.api.server.api.resource.v1.factories.AuthorizationDetailsTypeManagementServiceFactory; import javax.ws.rs.core.Response; @@ -31,8 +31,17 @@ */ public class AuthorizationDetailsTypesApiServiceImpl implements AuthorizationDetailsTypesApiService { - @Autowired - AuthorizationDetailsTypeManagementService typeMgtService; + private final AuthorizationDetailsTypeManagementService typeMgtService; + + public AuthorizationDetailsTypesApiServiceImpl() { + + try { + this.typeMgtService = AuthorizationDetailsTypeManagementServiceFactory + .getAuthorizationDetailsTypeManagementService(); + } catch (IllegalStateException e) { + throw new RuntimeException("Error occurred while initiating AuthorizationDetailsTypeManagementService.", e); + } + } @Override public Response authorizationDetailsTypesGet(String filter) { diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/resources/META-INF/cxf/api-resource-server-v1-cxf.xml b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/resources/META-INF/cxf/api-resource-server-v1-cxf.xml deleted file mode 100644 index e69de29bb2..0000000000 From 210638a4f025b40cd2022b1540f80fc3c1fe6b70 Mon Sep 17 00:00:00 2001 From: Vimukthi Rajapaksha Date: Fri, 24 Jan 2025 14:31:30 +0530 Subject: [PATCH 12/13] Delete ~ --- ~ | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 ~ diff --git a/~ b/~ deleted file mode 100644 index 9dc43d74af..0000000000 --- a/~ +++ /dev/null @@ -1,6 +0,0 @@ -Merge remote-tracking branch 'upstream/master' -# Please enter a commit message to explain why this merge is necessary, -# especially if it merges an updated upstream into a topic branch. -# -# Lines starting with '#' will be ignored, and an empty message aborts -# the commit. From ba59fc6cf9a02758fac97b0535ccc6cb416689d1 Mon Sep 17 00:00:00 2001 From: vimukthiRajapaksha Date: Fri, 24 Jan 2025 14:33:13 +0530 Subject: [PATCH 13/13] Update the year of license header --- .../api/server/api/resource/v1/APIResourceCreationModel.java | 2 +- .../api/server/api/resource/v1/APIResourcePatchModel.java | 2 +- .../api/server/api/resource/v1/APIResourceResponse.java | 2 +- .../identity/api/server/api/resource/v1/ApiResourcesApi.java | 2 +- .../api/server/api/resource/v1/ApiResourcesApiService.java | 2 +- .../resource/v1/AuthorizationDetailsTypesCreationModel.java | 2 +- .../v1/AuthorizationDetailsTypesCreationModelAllOf.java | 2 +- .../api/resource/v1/AuthorizationDetailsTypesGetModel.java | 2 +- .../resource/v1/AuthorizationDetailsTypesGetModelAllOf.java | 2 +- .../api/resource/v1/AuthorizationDetailsTypesPatchModel.java | 2 +- .../factories/AuthorizationDetailsTypesApiServiceFactory.java | 2 +- .../resource/v1/core/ServerAPIResourceManagementService.java | 2 +- .../AuthorizationDetailsTypeManagementServiceFactory.java | 2 +- .../application/management/v1/AuthorizedAPICreationModel.java | 2 +- .../application/management/v1/AuthorizedAPIPatchModel.java | 2 +- .../application/management/v1/AuthorizedAPIResponse.java | 2 +- .../management/v1/AuthorizedAuthorizationDetailsTypes.java | 2 +- .../v1/core/ServerApplicationManagementService.java | 2 +- pom.xml | 4 ++-- 19 files changed, 20 insertions(+), 20 deletions(-) diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourceCreationModel.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourceCreationModel.java index bce68db78d..812e1dbe86 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourceCreationModel.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourceCreationModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2025, 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 diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourcePatchModel.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourcePatchModel.java index 411361d7e0..b5d5a2ee53 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourcePatchModel.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourcePatchModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2025, 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 diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourceResponse.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourceResponse.java index a57fd7dac9..4658a30120 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourceResponse.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/APIResourceResponse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2025, 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 diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApi.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApi.java index 0a419b6d74..540c35185e 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApi.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2025, 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 diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApiService.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApiService.java index c1d2f0051d..267f65c9e1 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApiService.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/ApiResourcesApiService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2025, 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 diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesCreationModel.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesCreationModel.java index 4e4873a451..2e8514f7fe 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesCreationModel.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesCreationModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2025, 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 diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesCreationModelAllOf.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesCreationModelAllOf.java index 13f88e1e9f..624d85e241 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesCreationModelAllOf.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesCreationModelAllOf.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2025, 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 diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesGetModel.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesGetModel.java index b71e9718f9..727fb0bf8f 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesGetModel.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesGetModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2025, 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 diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesGetModelAllOf.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesGetModelAllOf.java index d9a155f5c2..39a3f6526e 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesGetModelAllOf.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesGetModelAllOf.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2025, 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 diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesPatchModel.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesPatchModel.java index 1d6ae2be03..e403d3ca63 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesPatchModel.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/AuthorizationDetailsTypesPatchModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2025, 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 diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypesApiServiceFactory.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypesApiServiceFactory.java index 80a7b69fa2..c90233f9a1 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypesApiServiceFactory.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/gen/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypesApiServiceFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2025, 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 diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java index d455412c0e..7e254774fd 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/core/ServerAPIResourceManagementService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2023-2025, 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 diff --git a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypeManagementServiceFactory.java b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypeManagementServiceFactory.java index 6412fc753b..09e1ee2ed3 100644 --- a/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypeManagementServiceFactory.java +++ b/components/org.wso2.carbon.identity.api.server.api.resource/org.wso2.carbon.identity.api.server.api.resource.v1/src/main/java/org/wso2/carbon/identity/api/server/api/resource/v1/factories/AuthorizationDetailsTypeManagementServiceFactory.java @@ -24,7 +24,7 @@ import org.wso2.carbon.identity.api.server.api.resource.v1.core.AuthorizationDetailsTypeManagementService; /** - * Factory class for ServerAPIResourceManagementService. + * Factory class for AuthorizationDetailsTypeManagementService. */ public class AuthorizationDetailsTypeManagementServiceFactory { diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/AuthorizedAPICreationModel.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/AuthorizedAPICreationModel.java index f31395618e..ef253cd2f9 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/AuthorizedAPICreationModel.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/AuthorizedAPICreationModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2025, 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 diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/AuthorizedAPIPatchModel.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/AuthorizedAPIPatchModel.java index 9134c3697b..81d3d7c066 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/AuthorizedAPIPatchModel.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/AuthorizedAPIPatchModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2025, 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 diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/AuthorizedAPIResponse.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/AuthorizedAPIResponse.java index 8328eb6ef3..bfbdf5dc05 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/AuthorizedAPIResponse.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/AuthorizedAPIResponse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2025, 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 diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/AuthorizedAuthorizationDetailsTypes.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/AuthorizedAuthorizationDetailsTypes.java index 97fddc8b55..6a9bdb2bf3 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/AuthorizedAuthorizationDetailsTypes.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/gen/java/org/wso2/carbon/identity/api/server/application/management/v1/AuthorizedAuthorizationDetailsTypes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2025, 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 diff --git a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/ServerApplicationManagementService.java b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/ServerApplicationManagementService.java index 582a42624b..67bbc2f34d 100644 --- a/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/ServerApplicationManagementService.java +++ b/components/org.wso2.carbon.identity.api.server.application.management/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/ServerApplicationManagementService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2024, WSO2 LLC. (http://www.wso2.com). + * Copyright (c) 2019-2025, 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 diff --git a/pom.xml b/pom.xml index 84acb01f0d..4c0d855325 100644 --- a/pom.xml +++ b/pom.xml @@ -833,12 +833,12 @@ 1.4 1.2.4 1.11.21 - 7.7.128 + 7.7.130 3.0.5 1.12.0 **/gen/**/* 1.9.28 - 7.0.220 + 7.0.224 5.11.44 1.9.4 findbugs-exclude-filter.xml