Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2b99e3d
Introducing User Sharing APIs V2
BimsaraBodaragama Dec 8, 2025
6658088
Update the year of the license header in gen files.
BimsaraBodaragama Dec 11, 2025
95120a2
Update API contract - Remove immediate support from general share.
BimsaraBodaragama Dec 12, 2025
10deb85
Comment openapi-generator-plugin.
BimsaraBodaragama Dec 12, 2025
6a3c072
Implement the api core logic.
BimsaraBodaragama Dec 17, 2025
2545e70
Add debug logs to the starting of each end points.
BimsaraBodaragama Dec 17, 2025
a3b625b
Update snapshot version of user sharing v2
BimsaraBodaragama Dec 18, 2025
381eb80
Address wso2-engineering bot comments.
BimsaraBodaragama Dec 18, 2025
533154f
Format.
BimsaraBodaragama Dec 18, 2025
b6bdeef
Address comments of copilot
BimsaraBodaragama Dec 18, 2025
18f4dc9
Update pom.
BimsaraBodaragama Dec 18, 2025
795deca
Update pom version.
BimsaraBodaragama Dec 18, 2025
e8db4ea
Address code-rabbit comments.
BimsaraBodaragama Dec 19, 2025
64a0a4c
Address code-rabbit comments -2.
BimsaraBodaragama Dec 19, 2025
1bc3ef4
Address code-rabbit comments -3.
BimsaraBodaragama Dec 19, 2025
2ddaf94
Address code-rabbit comments -4.
BimsaraBodaragama Dec 19, 2025
936483d
Address code-rabbit comments -5.
BimsaraBodaragama Dec 22, 2025
a848cd5
Address code-rabbit comments -6.
BimsaraBodaragama Dec 22, 2025
b4b2dd4
Address code-rabbit comments -7.
BimsaraBodaragama Dec 22, 2025
512480a
Address code-rabbit comments -8.
BimsaraBodaragama Dec 22, 2025
d8c4bf5
Address code-rabbit comments -9.
BimsaraBodaragama Dec 22, 2025
693f836
Merge branch 'master' into user-sharing-v2
BimsaraBodaragama Jan 17, 2026
270811b
Updating getUserSharedOrganizations business logic to handle pagination.
BimsaraBodaragama Jan 17, 2026
250a505
Merge remote-tracking branch 'origin/user-sharing-v2' into user-shari…
BimsaraBodaragama Jan 17, 2026
d66d784
Update pom version and checkstyle.
BimsaraBodaragama Jan 17, 2026
2573650
Update pom version and address coderabbit's suggestions.
BimsaraBodaragama Jan 17, 2026
c15bab8
Add organization metadata fields to UserSharedOrganization response m…
BimsaraBodaragama Jan 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.server.organization.user.sharing.management</artifactId>
<version>1.3.226-SNAPSHOT</version>
<version>1.3.229-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.identity.organization.management.organization.user.sharing.UserSharingPolicyHandlerService;
import org.wso2.carbon.identity.organization.management.organization.user.sharing.UserSharingPolicyHandlerServiceV2;

/**
* Holds the services which the shared user sharing management API component is using.
Expand All @@ -35,7 +36,14 @@ private static class UserSharingPolicyHandlerServiceHolder {
private static final UserSharingPolicyHandlerService SERVICE = (UserSharingPolicyHandlerService)
PrivilegedCarbonContext.getThreadLocalCarbonContext()
.getOSGiService(UserSharingPolicyHandlerService.class, null);
}
}

private static class UserSharingPolicyHandlerServiceV2Holder {

private static final UserSharingPolicyHandlerServiceV2 SERVICE =
(UserSharingPolicyHandlerServiceV2) PrivilegedCarbonContext.getThreadLocalCarbonContext()
.getOSGiService(UserSharingPolicyHandlerServiceV2.class, null);
}

/**
* Get UserSharingPolicyHandlerService service.
Expand All @@ -46,4 +54,14 @@ public static UserSharingPolicyHandlerService getUserSharingPolicyHandlerService

return UserSharingMgtServiceHolder.UserSharingPolicyHandlerServiceHolder.SERVICE;
}

/**
* Get UserSharingPolicyHandlerServiceV2 service.
*
* @return UserSharingPolicyHandlerServiceV2.
*/
public static UserSharingPolicyHandlerServiceV2 getUserSharingPolicyHandlerServiceV2() {

return UserSharingMgtServiceHolder.UserSharingPolicyHandlerServiceV2Holder.SERVICE;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public class UserSharingMgtConstants {
public static final String RESPONSE_STATUS_PROCESSING = "Processing";
public static final String RESPONSE_DETAIL_USER_SHARE = "User sharing process triggered successfully.";
public static final String RESPONSE_DETAIL_USER_UNSHARE = "User unsharing process triggered successfully.";
public static final String RESPONSE_DETAIL_USER_SHARE_PATCH =
"Shared user attributes patch process triggered successfully.";

/**
* Enum for user sharing management related errors.
Expand Down Expand Up @@ -60,6 +62,17 @@ public enum ErrorMessage {
"Invalid UUID format.",
"The UUID provided in the request is not in a valid format. " +
"Please provide a valid UUID."),
INVALID_USER_SHARE_PATCH_REQUEST_BODY("60005",
"Invalid user share patch request body.",
"The user share patch request body is either null or empty. " +
"Please provide a valid user share patch request body."),
ERROR_MISSING_USER_CRITERIA("60006",
"Missing user criteria in the request body.",
"The user criteria is missing in the request body. Please provide the user criteria to proceed."),
ERROR_UNSUPPORTED_USER_SHARE_PATCH_PATH("60007",
"Unsupported user share patch path.",
"The provided patch path to update attributes of shared user is not supported. " +
"Please provide a valid patch path."),

// Server errors.
ERROR_INITIATING_USERS_API_SERVICE("65001",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.server.organization.user.sharing.management</artifactId>
<version>1.3.229-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>org.wso2.carbon.identity.api.server.organization.user.sharing.management.v2</artifactId>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-service-description</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jaxrs</artifactId>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.server.organization.user.sharing.management.common</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.server.common</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.organization.management</groupId>
<artifactId>org.wso2.carbon.identity.organization.management.organization.user.sharing</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.organization.management</groupId>
<artifactId>org.wso2.carbon.identity.organization.resource.sharing.policy.management</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!--<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>4.1.2</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/organization-user-share-v2.yaml</inputSpec>
<generatorName>org.wso2.carbon.codegen.CxfWso2Generator</generatorName>
<configOptions>
<sourceFolder>src/gen/java</sourceFolder>
<apiPackage>org.wso2.carbon.identity.api.server.organization.user.sharing.management.v2</apiPackage>
<modelPackage>org.wso2.carbon.identity.api.server.organization.user.sharing.management.v2.model</modelPackage>
<packageName>org.wso2.carbon.identity.api.server.organization.user.sharing.management.v2</packageName>
<dateLibrary>java8</dateLibrary>
<hideGenerationTimestamp>true</hideGenerationTimestamp>
</configOptions>
<output>.</output>
<skipOverwrite>false</skipOverwrite>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>cxf-wso2-openapi-generator</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</plugin>-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/gen/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
Loading