diff --git a/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.common/pom.xml b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.common/pom.xml new file mode 100644 index 00000000..fd2a636b --- /dev/null +++ b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.common/pom.xml @@ -0,0 +1,39 @@ + + + + + + org.wso2.carbon.identity.user.api + org.wso2.carbon.identity.api.user.organization + 1.3.18-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.carbon.identity.api.user.organization.common + + + + org.springframework + spring-web + provided + + + org.wso2.carbon + org.wso2.carbon.core + provided + + + org.wso2.carbon.identity.organization.management.core + org.wso2.carbon.identity.organization.management.service + provided + + + diff --git a/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.common/src/main/java/org/wso2/carbon/identity/api/user/organization/common/UserOrganizationServiceHolder.java b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.common/src/main/java/org/wso2/carbon/identity/api/user/organization/common/UserOrganizationServiceHolder.java new file mode 100644 index 00000000..cb78a326 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.common/src/main/java/org/wso2/carbon/identity/api/user/organization/common/UserOrganizationServiceHolder.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2022, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. + * + * This software is the property of WSO2 LLC. and its suppliers, if any. + * Dissemination of any information or reproduction of any material contained + * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. + * You may not alter or remove any copyright or other notice from copies of this content. + */ + +package org.wso2.carbon.identity.api.user.organization.common; + +import org.wso2.carbon.identity.organization.management.service.OrganizationManager; +import org.wso2.carbon.identity.organization.management.service.OrganizationUserResidentResolverService; + +/** + * Service holder class for user organization management services. + */ +public class UserOrganizationServiceHolder { + + private static OrganizationUserResidentResolverService organizationUserResidentResolverService; + + private static OrganizationManager organizationManagementService; + + /** + * Method to get the organization user resident resolver osgi service. + * + * @return OrganizationUserResidentResolverService. + */ + public static OrganizationUserResidentResolverService getOrganizationUserResidentResolverService() { + + return organizationUserResidentResolverService; + } + + /** + * Set OrganizationUserResidentResolverService osgi service. + * + * @param organizationUserResidentResolverService OrganizationUserResidentResolverService. + */ + public static void setOrganizationUserResidentResolverService( + OrganizationUserResidentResolverService organizationUserResidentResolverService) { + + UserOrganizationServiceHolder.organizationUserResidentResolverService = organizationUserResidentResolverService; + } + + /** + * Get organization management service. + * + * @return Organization management service. + */ + public static OrganizationManager getOrganizationManagementService() { + + return organizationManagementService; + } + + /** + * Set Organization management OSGi service. + * + * @param organizationManagementService Organization management service. + */ + public static void setOrganizationManagementService( + OrganizationManager organizationManagementService) { + + UserOrganizationServiceHolder.organizationManagementService = organizationManagementService; + } +} diff --git a/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.common/src/main/java/org/wso2/carbon/identity/api/user/organization/common/factory/OrganizationManagementOSGIServiceFactory.java b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.common/src/main/java/org/wso2/carbon/identity/api/user/organization/common/factory/OrganizationManagementOSGIServiceFactory.java new file mode 100644 index 00000000..b259b429 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.common/src/main/java/org/wso2/carbon/identity/api/user/organization/common/factory/OrganizationManagementOSGIServiceFactory.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2022, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. + * + * This software is the property of WSO2 LLC. and its suppliers, if any. + * Dissemination of any information or reproduction of any material contained + * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. + * You may not alter or remove any copyright or other notice from copies of this content. + */ + +package org.wso2.carbon.identity.api.user.organization.common.factory; + +import org.springframework.beans.factory.config.AbstractFactoryBean; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.identity.organization.management.service.OrganizationManager; + +/** + * Factory Beans serves as a factory for creating other beans within the IOC container. This factory bean is used to + * instantiate the OrganizationManager type of object inside the container. + */ +public class OrganizationManagementOSGIServiceFactory extends AbstractFactoryBean { + + private OrganizationManager organizationManager; + + @Override + public Class getObjectType() { + + return Object.class; + } + + @Override + protected OrganizationManager createInstance() throws Exception { + + if (this.organizationManager == null) { + OrganizationManager service = (OrganizationManager) PrivilegedCarbonContext. + getThreadLocalCarbonContext().getOSGiService(OrganizationManager.class, null); + if (service != null) { + this.organizationManager = service; + } else { + throw new Exception("Unable to retrieve OrganizationManager service."); + } + } + return this.organizationManager; + } +} diff --git a/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.common/src/main/java/org/wso2/carbon/identity/api/user/organization/common/factory/OrganizationUserResidentResolverOSGIServiceFactory.java b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.common/src/main/java/org/wso2/carbon/identity/api/user/organization/common/factory/OrganizationUserResidentResolverOSGIServiceFactory.java new file mode 100644 index 00000000..9749eb7c --- /dev/null +++ b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.common/src/main/java/org/wso2/carbon/identity/api/user/organization/common/factory/OrganizationUserResidentResolverOSGIServiceFactory.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2022, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. + * + * This software is the property of WSO2 LLC. and its suppliers, if any. + * Dissemination of any information or reproduction of any material contained + * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. + * You may not alter or remove any copyright or other notice from copies of this content. + */ + +package org.wso2.carbon.identity.api.user.organization.common.factory; + +import org.springframework.beans.factory.config.AbstractFactoryBean; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.identity.organization.management.service.OrganizationUserResidentResolverService; + +/** + * Factory Beans serves as a factory for creating other beans within the IOC container. This factory bean is used to + * instantiate the OrganizationUserResidentResolverService type of object inside the container. + */ +public class OrganizationUserResidentResolverOSGIServiceFactory extends + AbstractFactoryBean { + + private OrganizationUserResidentResolverService organizationUserResidentResolverService; + + @Override + public Class getObjectType() { + + return Object.class; + } + + @Override + protected OrganizationUserResidentResolverService createInstance() throws Exception { + + if (this.organizationUserResidentResolverService == null) { + OrganizationUserResidentResolverService service = + (OrganizationUserResidentResolverService) PrivilegedCarbonContext. + getThreadLocalCarbonContext() + .getOSGiService(OrganizationUserResidentResolverService.class, null); + if (service != null) { + this.organizationUserResidentResolverService = service; + } else { + throw new Exception("Unable to retrieve OrganizationUserResidentResolverService service."); + } + } + return this.organizationUserResidentResolverService; + } +} diff --git a/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/pom.xml b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/pom.xml new file mode 100644 index 00000000..cac68440 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/pom.xml @@ -0,0 +1,170 @@ + + + + + + org.wso2.carbon.identity.user.api + org.wso2.carbon.identity.api.user.organization + 1.3.18-SNAPSHOT + ../pom.xml + + 4.0.0 + org.wso2.carbon.identity.api.user.organization.v1 + jar + WSO2 Identity Server - User Organization Management Rest API + WSO2 Identity Server - User Organization Management Rest API + + + + org.apache.cxf + cxf-rt-frontend-jaxrs + provided + + + org.apache.cxf + cxf-rt-rs-service-description + provided + + + org.springframework + spring-web + provided + + + javax.ws.rs + javax.ws.rs-api + provided + + + org.wso2.orbit.javax.xml.bind + jaxb-api + provided + + + io.swagger + swagger-jaxrs + + + com.fasterxml.jackson.core + jackson-databind + + + com.fasterxml.jackson.core + jackson-annotations + + + com.fasterxml.jackson.core + jackson-core + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + javax.ws.rs + jsr311-api + + + com.google.guava + guava + + + + + com.fasterxml.jackson.jaxrs + jackson-jaxrs-json-provider + provided + + + org.wso2.carbon.identity.user.api + org.wso2.carbon.identity.api.user.organization.common + + + org.wso2.carbon.identity.organization.management.core + org.wso2.carbon.identity.organization.management.service + + + org.wso2.carbon + org.wso2.carbon.utils + + + commons-lang + commons-lang + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.plugin.version} + + 1.8 + 1.8 + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.8 + + + add-source + generate-sources + + add-source + + + + src/gen/java + + + + + + + + diff --git a/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/gen/java/org/wso2/carbon/identity/api/user/organization/v1/OrganizationsApi.java b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/gen/java/org/wso2/carbon/identity/api/user/organization/v1/OrganizationsApi.java new file mode 100644 index 00000000..472efc9e --- /dev/null +++ b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/gen/java/org/wso2/carbon/identity/api/user/organization/v1/OrganizationsApi.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.user.organization.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.user.organization.v1.model.BasicOrganizationObject; +import org.wso2.carbon.identity.api.user.organization.v1.model.Error; +import org.wso2.carbon.identity.api.user.organization.v1.model.RootOrganizationResponse; +import org.wso2.carbon.identity.api.user.organization.v1.OrganizationsApiService; + +import javax.validation.Valid; +import javax.ws.rs.*; +import javax.ws.rs.core.Response; +import io.swagger.annotations.*; + +import javax.validation.constraints.*; + +@Path("/organizations") +@Api(description = "The organizations API") + +public class OrganizationsApi { + + @Autowired + private OrganizationsApiService delegate; + + @Valid + @GET + @Path("/root/descendants") + + @Produces({ "application/json" }) + @ApiOperation(value = "Get the descendant organizations of the authenticated user's resident organization ", notes = "This API provides the capability to retrieve the descendant organizations of the authenticated user's resident organizations. The response includes the organization's id and name from the resident organization to the accessed child organization. Permission required:
- none Scope required:
- internal_login ", response = BasicOrganizationObject.class, responseContainer = "List", authorizations = { + @Authorization(value = "BasicAuth"), + @Authorization(value = "OAuth2", scopes = { + + }) + }, tags={ "me", }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Successful Response", response = BasicOrganizationObject.class, responseContainer = "List"), + @ApiResponse(code = 401, message = "Authentication information is missing or invalid.", response = Void.class), + @ApiResponse(code = 403, message = "Access forbidden.", response = Void.class), + @ApiResponse(code = 404, message = "Resource is not found.", response = Error.class), + @ApiResponse(code = 500, message = "Internal server error.", response = Error.class) + }) + public Response organizationsRootDescendantsGet() { + + return delegate.organizationsRootDescendantsGet(); + } + + @Valid + @GET + @Path("/root") + + @Produces({ "application/json" }) + @ApiOperation(value = "Get the root organization of the authenticated user ", notes = "This API provides the capability to retrieve the root organization of the authenticated user. Permission required:
- none Scope required:
- internal_login ", response = RootOrganizationResponse.class, authorizations = { + @Authorization(value = "BasicAuth"), + @Authorization(value = "OAuth2", scopes = { + + }) + }, tags={ "me" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Successful Response", response = RootOrganizationResponse.class), + @ApiResponse(code = 401, message = "Authentication information is missing or invalid.", response = Void.class), + @ApiResponse(code = 403, message = "Access forbidden.", response = Void.class), + @ApiResponse(code = 404, message = "Resource is not found.", response = Error.class), + @ApiResponse(code = 500, message = "Internal server error.", response = Error.class) + }) + public Response organizationsRootGet() { + + return delegate.organizationsRootGet(); + } + +} diff --git a/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/gen/java/org/wso2/carbon/identity/api/user/organization/v1/OrganizationsApiService.java b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/gen/java/org/wso2/carbon/identity/api/user/organization/v1/OrganizationsApiService.java new file mode 100644 index 00000000..fdb44173 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/gen/java/org/wso2/carbon/identity/api/user/organization/v1/OrganizationsApiService.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.user.organization.v1; + +import org.wso2.carbon.identity.api.user.organization.v1.*; +import org.wso2.carbon.identity.api.user.organization.v1.model.*; +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.user.organization.v1.model.BasicOrganizationObject; +import org.wso2.carbon.identity.api.user.organization.v1.model.Error; +import org.wso2.carbon.identity.api.user.organization.v1.model.RootOrganizationResponse; +import javax.ws.rs.core.Response; + + +public interface OrganizationsApiService { + + public Response organizationsRootDescendantsGet(); + + public Response organizationsRootGet(); +} diff --git a/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/gen/java/org/wso2/carbon/identity/api/user/organization/v1/factories/OrganizationsApiServiceFactory.java b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/gen/java/org/wso2/carbon/identity/api/user/organization/v1/factories/OrganizationsApiServiceFactory.java new file mode 100644 index 00000000..450a0c62 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/gen/java/org/wso2/carbon/identity/api/user/organization/v1/factories/OrganizationsApiServiceFactory.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.user.organization.v1.factories; + +import org.wso2.carbon.identity.api.user.organization.v1.OrganizationsApiService; +import org.wso2.carbon.identity.api.user.organization.v1.impl.OrganizationsApiServiceImpl; + +public class OrganizationsApiServiceFactory { + + private final static OrganizationsApiService service = new OrganizationsApiServiceImpl(); + + public static OrganizationsApiService getOrganizationsApi() + { + return service; + } +} diff --git a/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/gen/java/org/wso2/carbon/identity/api/user/organization/v1/model/BasicOrganizationObject.java b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/gen/java/org/wso2/carbon/identity/api/user/organization/v1/model/BasicOrganizationObject.java new file mode 100644 index 00000000..f1372245 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/gen/java/org/wso2/carbon/identity/api/user/organization/v1/model/BasicOrganizationObject.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.user.organization.v1.model; + +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 BasicOrganizationObject { + + private String id; + private String name; + + /** + **/ + public BasicOrganizationObject id(String id) { + + this.id = id; + return this; + } + + @ApiModelProperty(example = "77084a9d-113f-8281-a0d3-efe34b083213", required = true, value = "") + @JsonProperty("id") + @Valid + @NotNull(message = "Property id cannot be null.") + + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + + /** + **/ + public BasicOrganizationObject name(String name) { + + this.name = name; + return this; + } + + @ApiModelProperty(example = "ABC Builders", required = true, value = "") + @JsonProperty("name") + @Valid + @NotNull(message = "Property name cannot be null.") + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BasicOrganizationObject basicOrganizationObject = (BasicOrganizationObject) o; + return Objects.equals(this.id, basicOrganizationObject.id) && + Objects.equals(this.name, basicOrganizationObject.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class BasicOrganizationObject {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} + diff --git a/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/gen/java/org/wso2/carbon/identity/api/user/organization/v1/model/Error.java b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/gen/java/org/wso2/carbon/identity/api/user/organization/v1/model/Error.java new file mode 100644 index 00000000..db797e3f --- /dev/null +++ b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/gen/java/org/wso2/carbon/identity/api/user/organization/v1/model/Error.java @@ -0,0 +1,169 @@ +/* + * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.user.organization.v1.model; + +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 Error { + + private String code; + private String message; + private String description; + private String traceId; + + /** + * An error code. + **/ + public Error code(String code) { + + this.code = code; + return this; + } + + @ApiModelProperty(example = "UOM-00000", required = true, value = "An error code.") + @JsonProperty("code") + @Valid + @NotNull(message = "Property code cannot be null.") + + public String getCode() { + return code; + } + public void setCode(String code) { + this.code = code; + } + + /** + * An error message. + **/ + public Error message(String message) { + + this.message = message; + return this; + } + + @ApiModelProperty(example = "Some Error Message", required = true, value = "An error message.") + @JsonProperty("message") + @Valid + @NotNull(message = "Property message cannot be null.") + + public String getMessage() { + return message; + } + public void setMessage(String message) { + this.message = message; + } + + /** + * An error description. + **/ + public Error description(String description) { + + this.description = description; + return this; + } + + @ApiModelProperty(example = "Some Error Description", value = "An error description.") + @JsonProperty("description") + @Valid + public String getDescription() { + return description; + } + public void setDescription(String description) { + this.description = description; + } + + /** + * An error trace identifier. + **/ + public Error traceId(String traceId) { + + this.traceId = traceId; + return this; + } + + @ApiModelProperty(example = "e0fbcfeb-3617-43c4-8dd0-7b7d38e13047", value = "An error trace identifier.") + @JsonProperty("traceId") + @Valid + public String getTraceId() { + return traceId; + } + public void setTraceId(String traceId) { + this.traceId = traceId; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Error error = (Error) o; + return Objects.equals(this.code, error.code) && + Objects.equals(this.message, error.message) && + Objects.equals(this.description, error.description) && + Objects.equals(this.traceId, error.traceId); + } + + @Override + public int hashCode() { + return Objects.hash(code, message, description, traceId); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class Error {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" traceId: ").append(toIndentedString(traceId)).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.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/gen/java/org/wso2/carbon/identity/api/user/organization/v1/model/RootOrganizationResponse.java b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/gen/java/org/wso2/carbon/identity/api/user/organization/v1/model/RootOrganizationResponse.java new file mode 100644 index 00000000..ba69e1dd --- /dev/null +++ b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/gen/java/org/wso2/carbon/identity/api/user/organization/v1/model/RootOrganizationResponse.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.user.organization.v1.model; + +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 RootOrganizationResponse { + + private String id; + private String name; + + /** + **/ + public RootOrganizationResponse id(String id) { + + this.id = id; + return this; + } + + @ApiModelProperty(example = "77084a9d-113f-8281-a0d3-efe34b083213", required = true, value = "") + @JsonProperty("id") + @Valid + @NotNull(message = "Property id cannot be null.") + + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + + /** + **/ + public RootOrganizationResponse name(String name) { + + this.name = name; + return this; + } + + @ApiModelProperty(example = "ABC Builders", required = true, value = "") + @JsonProperty("name") + @Valid + @NotNull(message = "Property name cannot be null.") + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + + + @Override + public boolean equals(java.lang.Object o) { + + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RootOrganizationResponse rootOrganizationResponse = (RootOrganizationResponse) o; + return Objects.equals(this.id, rootOrganizationResponse.id) && + Objects.equals(this.name, rootOrganizationResponse.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class RootOrganizationResponse {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n"); + } +} + diff --git a/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/main/java/org/wso2/carbon/identity/api/user/organization/v1/core/UserOrganizationService.java b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/main/java/org/wso2/carbon/identity/api/user/organization/v1/core/UserOrganizationService.java new file mode 100644 index 00000000..9aa650e4 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/main/java/org/wso2/carbon/identity/api/user/organization/v1/core/UserOrganizationService.java @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2022, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. + * + * This software is the property of WSO2 LLC. and its suppliers, if any. + * Dissemination of any information or reproduction of any material contained + * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. + * You may not alter or remove any copyright or other notice from copies of this content. + */ + +package org.wso2.carbon.identity.api.user.organization.v1.core; + +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.context.PrivilegedCarbonContext; +import org.wso2.carbon.identity.api.user.organization.common.UserOrganizationServiceHolder; +import org.wso2.carbon.identity.api.user.organization.v1.exceptions.UserOrganizationManagementEndpointException; +import org.wso2.carbon.identity.api.user.organization.v1.model.BasicOrganizationObject; +import org.wso2.carbon.identity.api.user.organization.v1.model.RootOrganizationResponse; +import org.wso2.carbon.identity.organization.management.service.OrganizationManager; +import org.wso2.carbon.identity.organization.management.service.OrganizationUserResidentResolverService; +import org.wso2.carbon.identity.organization.management.service.exception.OrganizationManagementException; +import org.wso2.carbon.identity.organization.management.service.model.BasicOrganization; + +import java.util.ArrayList; +import java.util.List; + +import javax.ws.rs.core.Response; + +import static org.wso2.carbon.identity.api.user.organization.v1.util.Util.getError; +import static org.wso2.carbon.identity.organization.management.service.constant.OrganizationManagementConstants.ErrorMessages.ERROR_CODE_USER_ROOT_ORGANIZATION_NOT_FOUND; +import static org.wso2.carbon.identity.organization.management.service.constant.OrganizationManagementConstants.SUPER_ORG_ID; + +/** + * Call internal osgi services to perform user organization management related operations. + */ +public class UserOrganizationService { + + private static final Log LOG = LogFactory.getLog(UserOrganizationService.class); + + /** + * Retrieves the root organization visible to the user in the organization hierarchy. + * + * @return The root organization of the authenticated user. + */ + public RootOrganizationResponse getUserOrganizationRoot() { + + String userId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUserId(); + String accessedOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getOrganizationId(); + if (StringUtils.isBlank(accessedOrgId)) { + accessedOrgId = SUPER_ORG_ID; + } + try { + String rootOrgId = getOrganizationUserResidentResolverService() + .resolveResidentOrganization(userId, accessedOrgId) + .orElseThrow(() -> new UserOrganizationManagementEndpointException(Response.Status.NOT_FOUND, + getError(ERROR_CODE_USER_ROOT_ORGANIZATION_NOT_FOUND, userId))); + return buildRootOrganizationResponse(rootOrgId); + } catch (OrganizationManagementException e) { + LOG.error(String.format("Server encountered an error while retrieving root organization of user with ID: " + + "%s.", userId), e); + throw new UserOrganizationManagementEndpointException(Response.Status.INTERNAL_SERVER_ERROR, getError(e)); + } + } + + /** + * Retrieves the user organization hierarchy up to the resident organization. + * + * @return The root descendants organizations of the authenticated user. + */ + public List getUserOrganizationHierarchyUptoResidentOrganization() { + + String userId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUserId(); + String accessedOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getOrganizationId(); + if (StringUtils.isBlank(accessedOrgId)) { + accessedOrgId = SUPER_ORG_ID; + } + try { + List rootDescendantsOrganizationResponseList = new ArrayList<>(); + List basicOrganizationList = getOrganizationUserResidentResolverService() + .getHierarchyUptoResidentOrganization(userId, accessedOrgId); + for (BasicOrganization basicOrganization: basicOrganizationList) { + BasicOrganizationObject basicOrganizationObject = new BasicOrganizationObject(); + basicOrganizationObject.setId(basicOrganization.getId()); + basicOrganizationObject.setName(basicOrganization.getName()); + rootDescendantsOrganizationResponseList.add(basicOrganizationObject); + } + return rootDescendantsOrganizationResponseList; + } catch (OrganizationManagementException e) { + LOG.error(String.format("Server encountered an error while retrieving the descendants of user resident" + + " organization until the accessed organization of user with ID: %s.", userId), e); + throw new UserOrganizationManagementEndpointException(Response.Status.INTERNAL_SERVER_ERROR, getError(e)); + } + } + + private RootOrganizationResponse buildRootOrganizationResponse(String rootOrgId) + throws OrganizationManagementException { + + RootOrganizationResponse rootOrganizationResponse = new RootOrganizationResponse(); + rootOrganizationResponse.setId(rootOrgId); + rootOrganizationResponse.setName(getOrganizationManagementService().getOrganizationNameById(rootOrgId)); + return rootOrganizationResponse; + } + + private OrganizationUserResidentResolverService getOrganizationUserResidentResolverService() { + + return UserOrganizationServiceHolder.getOrganizationUserResidentResolverService(); + } + + private OrganizationManager getOrganizationManagementService() { + + return UserOrganizationServiceHolder.getOrganizationManagementService(); + } +} diff --git a/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/main/java/org/wso2/carbon/identity/api/user/organization/v1/exceptions/UserOrganizationManagementEndpointException.java b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/main/java/org/wso2/carbon/identity/api/user/organization/v1/exceptions/UserOrganizationManagementEndpointException.java new file mode 100644 index 00000000..c8b4f278 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/main/java/org/wso2/carbon/identity/api/user/organization/v1/exceptions/UserOrganizationManagementEndpointException.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2022, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. + * + * This software is the property of WSO2 LLC. and its suppliers, if any. + * Dissemination of any information or reproduction of any material contained + * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. + * You may not alter or remove any copyright or other notice from copies of this content. + */ + +package org.wso2.carbon.identity.api.user.organization.v1.exceptions; + +import org.wso2.carbon.identity.api.user.organization.v1.model.Error; + +import javax.ws.rs.WebApplicationException; +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +/** + * Custom exception for user organization management endpoint. + */ +public class UserOrganizationManagementEndpointException extends WebApplicationException { + + public UserOrganizationManagementEndpointException(Response.Status status, Error error) { + + super(Response.status(status).entity(error).header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) + .build()); + } + + public UserOrganizationManagementEndpointException(Response.Status status) { + + super(Response.status(status).build()); + } +} diff --git a/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/main/java/org/wso2/carbon/identity/api/user/organization/v1/impl/OrganizationsApiServiceImpl.java b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/main/java/org/wso2/carbon/identity/api/user/organization/v1/impl/OrganizationsApiServiceImpl.java new file mode 100644 index 00000000..e202e389 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/main/java/org/wso2/carbon/identity/api/user/organization/v1/impl/OrganizationsApiServiceImpl.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.api.user.organization.v1.impl; + +import org.springframework.beans.factory.annotation.Autowired; +import org.wso2.carbon.identity.api.user.organization.v1.OrganizationsApiService; +import org.wso2.carbon.identity.api.user.organization.v1.core.UserOrganizationService; +import javax.ws.rs.core.Response; + +/** + * Implementation of the user Organization API Service. + */ +public class OrganizationsApiServiceImpl implements OrganizationsApiService { + + @Autowired + UserOrganizationService userOrganizationService; + + @Override + public Response organizationsRootDescendantsGet() { + + return Response.ok(userOrganizationService.getUserOrganizationRoot()).build(); + } + + @Override + public Response organizationsRootGet() { + return Response.ok(userOrganizationService.getUserOrganizationHierarchyUptoResidentOrganization()).build(); + } +} diff --git a/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/main/java/org/wso2/carbon/identity/api/user/organization/v1/util/Util.java b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/main/java/org/wso2/carbon/identity/api/user/organization/v1/util/Util.java new file mode 100644 index 00000000..35b38643 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/main/java/org/wso2/carbon/identity/api/user/organization/v1/util/Util.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2022, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. + * + * This software is the property of WSO2 LLC. and its suppliers, if any. + * Dissemination of any information or reproduction of any material contained + * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. + * You may not alter or remove any copyright or other notice from copies of this content. + */ + +package org.wso2.carbon.identity.api.user.organization.v1.util; + +import org.apache.commons.lang.ArrayUtils; +import org.wso2.carbon.identity.api.user.organization.v1.model.Error; +import org.wso2.carbon.identity.organization.management.service.constant.OrganizationManagementConstants; +import org.wso2.carbon.identity.organization.management.service.exception.OrganizationManagementException; + +/** + * This class provides util functions to the user organization management endpoint. + */ +public class Util { + + /** + * Returns a generic error object. + * + * @param errorMessages The error enum. + * @param data The error message data. + * @return A generic error with the specified details. + */ + public static Error getError(OrganizationManagementConstants.ErrorMessages errorMessages, String... data) { + + Error error = new Error(); + error.setCode(errorMessages.getCode()); + error.setMessage(errorMessages.getMessage()); + String description = errorMessages.getDescription(); + if (ArrayUtils.isNotEmpty(data)) { + description = String.format(description, data); + } + error.setDescription(description); + return error; + } + + /** + * Returns a generic error object. + * + * @param exception OrganizationManagementException. + * @return A generic error with the specified details. + */ + public static Error getError(OrganizationManagementException exception) { + + Error error = new Error(); + error.setCode(exception.getErrorCode()); + error.setMessage(exception.getMessage()); + error.setDescription(exception.getDescription()); + return error; + } +} diff --git a/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/main/resources/META-INF/cxf/user-organization-v1-cxf.xml b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/main/resources/META-INF/cxf/user-organization-v1-cxf.xml new file mode 100644 index 00000000..45e7b10a --- /dev/null +++ b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/main/resources/META-INF/cxf/user-organization-v1-cxf.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + diff --git a/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/main/resources/user.organization.yaml b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/main/resources/user.organization.yaml new file mode 100644 index 00000000..ba32862c --- /dev/null +++ b/components/org.wso2.carbon.identity.api.user.organization/org.wso2.carbon.identity.api.user.organization.v1/src/main/resources/user.organization.yaml @@ -0,0 +1,180 @@ +openapi: 3.0.0 +info: + version: "v1" + title: 'Private CIAM Cloud - User Organization Management API Definition' + description: 'This is the RESTful API for retrieving authenticated users resident organization in CIAM Cloud. + This API provides the capability to retrieve the root organization of the authenticated user.' + contact: + name: WSO2 + url: 'https://wso2.com/ciam-suite/private-ciam-cloud/b2b-ciam' + email: iam-dev@wso2.org + license: + name: Apache 2.0 + url: 'http://www.apache.org/licenses/LICENSE-2.0.html' +servers: + - url: 'https://localhost:9443/o/{organization-domain}/api/users/v1/me/organizations' + variables: + organization-domain: + default: 10084a8d-113f-4211-a0d5-efe36b082211 +security: + - OAuth2: [] + - BasicAuth: [] + +tags: + - name: me + description: Operations for the authenticated user + +paths: + /organizations/root: + get: + tags: + - me + summary: | + Get the root organization of the authenticated user + description: | + This API provides the capability to retrieve + the root organization of the authenticated user. + + Permission required:
+ - none + + Scope required:
+ - internal_login + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/RootOrganizationResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '500': + $ref: '#/components/responses/ServerError' + /organizations/root/descendants: + get: + tags: + - me + summary: | + Get the descendant organizations of the authenticated user's resident organization + description: | + This API provides the capability to retrieve + the descendant organizations of the authenticated user's resident organizations. The response includes + the organization's id and name from the resident organization to the accessed child organization. + + Permission required:
+ - none + + Scope required:
+ - internal_login + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/RootDescendantsOrganizationResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '500': + $ref: '#/components/responses/ServerError' + +components: + schemas: + RootOrganizationResponse: + type: object + required: + - id + - name + properties: + id: + type: string + example: '77084a9d-113f-8281-a0d3-efe34b083213' + name: + type: string + example: 'ABC Builders' + + BasicOrganizationObject: + type: object + required: + - id + - name + properties: + id: + type: string + example: '77084a9d-113f-8281-a0d3-efe34b083213' + name: + type: string + example: 'ABC Builders' + + RootDescendantsOrganizationResponse: + type: array + items: + $ref: '#/components/schemas/BasicOrganizationObject' + + Error: + type: object + required: + - code + - message + properties: + code: + type: string + example: UOM-00000 + description: An error code. + message: + type: string + example: Some Error Message + description: An error message. + description: + type: string + example: Some Error Description + description: An error description. + traceId: + type: string + example: e0fbcfeb-3617-43c4-8dd0-7b7d38e13047 + description: An error trace identifier. + + #-------------------------------------------------------- + # Descriptions of error responses. + #-------------------------------------------------------- + responses: + NotFound: + description: Resource is not found. + content: + 'application/json': + schema: + $ref: '#/components/schemas/Error' + Unauthorized: + description: Authentication information is missing or invalid. + Forbidden: + description: Access forbidden. + ServerError: + description: Internal server error. + content: + 'application/json': + schema: + $ref: '#/components/schemas/Error' + + #----------------------------------------------------- + # Applicable authentication mechanisms. + #----------------------------------------------------- + securitySchemes: + BasicAuth: + type: http + scheme: basic + OAuth2: + type: oauth2 + flows: + authorizationCode: + authorizationUrl: 'https://localhost:9443/oauth2/authorize' + tokenUrl: 'https://localhost:9443/oauth2/token' + scopes: {} diff --git a/components/org.wso2.carbon.identity.api.user.organization/pom.xml b/components/org.wso2.carbon.identity.api.user.organization/pom.xml new file mode 100644 index 00000000..57c0359d --- /dev/null +++ b/components/org.wso2.carbon.identity.api.user.organization/pom.xml @@ -0,0 +1,26 @@ + + + + + + identity-api-user + org.wso2.carbon.identity.user.api + 1.3.18-SNAPSHOT + ../../pom.xml + + 4.0.0 + + org.wso2.carbon.identity.api.user.organization + pom + + org.wso2.carbon.identity.api.user.organization.v1 + org.wso2.carbon.identity.api.user.organization.common + + diff --git a/pom.xml b/pom.xml index 17d95c17..6aa6914e 100644 --- a/pom.xml +++ b/pom.xml @@ -66,6 +66,11 @@ javax.ws.rs-api ${javax.ws.rs-api.version} + + org.wso2.orbit.javax.xml.bind + jaxb-api + ${version.org.wso2.orbit.javax.xml.bind} + io.swagger swagger-jaxrs @@ -193,6 +198,12 @@ org.wso2.carbon.identity.oauth.common ${identity.oauth.version} + + org.wso2.carbon.identity.organization.management.core + org.wso2.carbon.identity.organization.management.service + ${identity.org.mgt.core.version} + provided + org.wso2.carbon.extension.identity.authenticator.outbound.totp @@ -253,6 +264,18 @@ ${carbon.kernel.version} provided + + org.wso2.carbon + org.wso2.carbon.core + ${carbon.kernel.version} + provided + + + org.wso2.carbon + org.wso2.carbon.utils + ${carbon.kernel.version} + provided + @@ -277,6 +300,12 @@ ${project.version} provided + + org.wso2.carbon.identity.user.api + org.wso2.carbon.identity.api.user.organization.common + ${project.version} + provided + org.wso2.carbon.identity.framework org.wso2.carbon.identity.core @@ -388,6 +417,7 @@ 5.3.25 1.6.2 2.1.1 + 2.3.1.wso2v1 1.4 1.2.4 4.9.0 @@ -397,6 +427,7 @@ 3.0.5 4.5.2 6.7.71 + 1.0.50 6.9.10 5.1.17 3.3.1 @@ -423,6 +454,7 @@ components/org.wso2.carbon.identity.api.user.backupcode components/org.wso2.carbon.identity.api.user.mfa components/org.wso2.carbon.identity.api.user.idv + components/org.wso2.carbon.identity.api.user.organization