Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2026, 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">
<parent>
<groupId>org.wso2.carbon.identity.user.api</groupId>
<artifactId>org.wso2.carbon.identity.api.user.consent</artifactId>
<version>1.5.12-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>org.wso2.carbon.identity.api.user.consent.common</artifactId>

<dependencies>
<dependency>
<groupId>org.wso2.carbon.consent.mgt</groupId>
<artifactId>org.wso2.carbon.consent.mgt.core</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright (c) 2026, 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.consent.common.util;

import org.wso2.carbon.consent.mgt.core.PrivilegedConsentManager;
import org.wso2.carbon.context.PrivilegedCarbonContext;

/**
* Service holder class for consent management OSGi services.
*/
public class ConsentManagementServiceHolder {

private ConsentManagementServiceHolder() {}

private static class PrivilegedConsentManagerHolder {

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

/**
* Returns the PrivilegedConsentManager OSGi service.
*
* @return PrivilegedConsentManager
*/
public static PrivilegedConsentManager getPrivilegedConsentManager() {

return PrivilegedConsentManagerHolder.SERVICE;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2026, 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">

<parent>
<groupId>org.wso2.carbon.identity.user.api</groupId>
<artifactId>org.wso2.carbon.identity.api.user.consent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.5.12-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.identity.rest.api.user.consent.v1</artifactId>
<packaging>jar</packaging>
<name>WSO2 Identity Server - User Consent Management Rest API</name>
<description>WSO2 Identity Server - User Self-Service Consent Management Rest API</description>

<build>
<plugins>
<!--Dependency to generate the code from the openapi generation.-->
<!-- <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/consent.yaml</inputSpec>-->
<!-- <generatorName>org.wso2.carbon.codegen.CxfWso2Generator</generatorName>-->
<!-- <configOptions>-->
<!-- <sourceFolder>src/gen/java</sourceFolder>-->
<!-- <apiPackage>org.wso2.carbon.identity.api.user.consent.v1</apiPackage>-->
<!-- <modelPackage>org.wso2.carbon.identity.api.user.consent.v1.model</modelPackage>-->
<!-- <packageName>org.wso2.carbon.identity.api.user.consent.v1</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>
</plugins>
</build>

<dependencies>
<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>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</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>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.user.api</groupId>
<artifactId>org.wso2.carbon.identity.api.user.common</artifactId>
<scope>provided</scope>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.user.api</groupId>
<artifactId>org.wso2.carbon.identity.api.user.consent.common</artifactId>
<scope>provided</scope>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon.consent.mgt</groupId>
<artifactId>org.wso2.carbon.consent.mgt.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Loading
Loading