-
Notifications
You must be signed in to change notification settings - Fork 190
Verifiable Presentations Template Management #1091
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
udeepa15
wants to merge
10
commits into
wso2:feature-oid4vp
Choose a base branch
from
udeepa15:presentation-management
base: feature-oid4vp
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
fb3514d
Add VP presentation definition API module
udeepa15 f7002ca
Rename presentation-def module to vp.template
udeepa15 9dc5aad
Support requested credentials in VP templates
udeepa15 0f475d2
Switch to RequestedCredential objects
udeepa15 ee63b6a
Replace common/v1 deps with vp.template dependency
udeepa15 ed5348f
Use 'credentials' and 'claims' field names
udeepa15 272e764
Replace definition with credentials list
udeepa15 4b2c406
Update openid4vc artifact & imports to management
udeepa15 a9a7b36
Switch to presentation.management module
udeepa15 99ae076
Update copyright year to 2026
udeepa15 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
...late.management/org.wso2.carbon.identity.api.server.vp.template.management.common/pom.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| <?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"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <parent> | ||
| <groupId>org.wso2.carbon.identity.server.api</groupId> | ||
| <artifactId>org.wso2.carbon.identity.api.server.vp.template.management</artifactId> | ||
| <version>1.5.10-SNAPSHOT</version> | ||
| <relativePath>../pom.xml</relativePath> | ||
| </parent> | ||
|
|
||
| <artifactId>org.wso2.carbon.identity.api.server.vp.template.management.common</artifactId> | ||
| <packaging>jar</packaging> | ||
| <name>WSO2 Carbon - VP Template Management API Common</name> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.wso2.carbon</groupId> | ||
| <artifactId>org.wso2.carbon.utils</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.wso2.carbon.identity.openid4vc</groupId> | ||
| <artifactId>org.wso2.carbon.identity.openid4vc.presentation.management</artifactId> | ||
| <scope>provided</scope> | ||
| </dependency> | ||
| </dependencies> | ||
| </project> |
83 changes: 83 additions & 0 deletions
83
...on/identity/api/server/vp/template/management/common/VPDefinitionManagementConstants.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| /* | ||
| * 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.server.vp.template.management.common; | ||
|
|
||
| /** | ||
| * Constants for Presentation Definition Management API. | ||
| */ | ||
| public class VPDefinitionManagementConstants { | ||
|
|
||
| private VPDefinitionManagementConstants() { | ||
| } | ||
|
|
||
| public static final String VP_DEFINITION_MANAGEMENT_PATH_COMPONENT = "/presentation-definitions"; | ||
|
|
||
| /** | ||
| * Enum for error messages. | ||
| */ | ||
| public enum ErrorMessage { | ||
|
|
||
| // Client errors (60xxx). | ||
| ERROR_CODE_DEFINITION_NOT_FOUND("VPD-60001", "Presentation definition not found.", | ||
| "Unable to find a presentation definition with the id: %s"), | ||
| ERROR_CODE_INVALID_INPUT("VPD-60002", "Invalid input.", | ||
| "Provided input is invalid. %s"), | ||
| ERROR_CODE_DEFINITION_ALREADY_EXISTS("VPD-60003", "Presentation definition already exists.", | ||
| "A presentation definition with the given identifier already exists."), | ||
|
|
||
| // Server errors (65xxx). | ||
| ERROR_CODE_ERROR_LISTING_DEFINITIONS("VPD-65001", "Error listing presentation definitions.", | ||
| "A system error occurred while listing presentation definitions."), | ||
| ERROR_CODE_ERROR_CREATING_DEFINITION("VPD-65002", "Error creating presentation definition.", | ||
| "A system error occurred while creating the presentation definition."), | ||
| ERROR_CODE_ERROR_RETRIEVING_DEFINITION("VPD-65003", "Error retrieving presentation definition.", | ||
| "A system error occurred while retrieving the presentation definition with id: %s"), | ||
| ERROR_CODE_ERROR_UPDATING_DEFINITION("VPD-65004", "Error updating presentation definition.", | ||
| "A system error occurred while updating the presentation definition with id: %s"), | ||
| ERROR_CODE_ERROR_DELETING_DEFINITION("VPD-65005", "Error deleting presentation definition.", | ||
| "A system error occurred while deleting the presentation definition with id: %s"); | ||
|
|
||
| private final String code; | ||
| private final String message; | ||
| private final String description; | ||
|
|
||
| ErrorMessage(String code, String message, String description) { | ||
| this.code = code; | ||
| this.message = message; | ||
| this.description = description; | ||
| } | ||
|
|
||
| public String getCode() { | ||
| return code; | ||
| } | ||
|
|
||
| public String getMessage() { | ||
| return message; | ||
| } | ||
|
|
||
| public String getDescription() { | ||
| return description; | ||
| } | ||
|
|
||
| @Override | ||
| public String toString() { | ||
| return code + " | " + message; | ||
| } | ||
| } | ||
| } |
44 changes: 44 additions & 0 deletions
44
...dentity/api/server/vp/template/management/common/VPDefinitionManagementServiceHolder.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| /* | ||
| * 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.server.vp.template.management.common; | ||
|
|
||
| import org.wso2.carbon.context.PrivilegedCarbonContext; | ||
| import org.wso2.carbon.identity.openid4vc.presentation.management.service.PresentationDefinitionService; | ||
|
|
||
| /** | ||
| * Service holder for VP Definition Management. | ||
| * Obtains the PresentationDefinitionService OSGi service via PrivilegedCarbonContext. | ||
| */ | ||
| public class VPDefinitionManagementServiceHolder { | ||
|
|
||
| private VPDefinitionManagementServiceHolder() { | ||
| } | ||
|
|
||
| /** | ||
| * Get PresentationDefinitionService OSGi service. | ||
| * | ||
| * @return PresentationDefinitionService instance | ||
| */ | ||
| public static PresentationDefinitionService getPresentationDefinitionService() { | ||
|
|
||
| return (PresentationDefinitionService) PrivilegedCarbonContext | ||
| .getThreadLocalCarbonContext() | ||
| .getOSGiService(PresentationDefinitionService.class, null); | ||
| } | ||
| } | ||
132 changes: 132 additions & 0 deletions
132
...template.management/org.wso2.carbon.identity.api.server.vp.template.management.v1/pom.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,132 @@ | ||
| <?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"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <parent> | ||
| <groupId>org.wso2.carbon.identity.server.api</groupId> | ||
| <artifactId>org.wso2.carbon.identity.api.server.vp.template.management</artifactId> | ||
| <version>1.5.10-SNAPSHOT</version> | ||
| <relativePath>../pom.xml</relativePath> | ||
| </parent> | ||
|
|
||
| <name>WSO2 Identity Server - VP Template Management API</name> | ||
| <description>WSO2 IS - VP Template Management API</description> | ||
| <artifactId>org.wso2.carbon.identity.api.server.vp.template.management.v1</artifactId> | ||
| <packaging>jar</packaging> | ||
|
|
||
| <dependencies> | ||
| <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>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>org.wso2.carbon.identity.server.api</groupId> | ||
| <artifactId>org.wso2.carbon.identity.api.server.common</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.wso2.carbon.identity.server.api</groupId> | ||
| <artifactId>org.wso2.carbon.identity.api.server.vp.template.management.common</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.wso2.carbon.identity.openid4vc</groupId> | ||
| <artifactId>org.wso2.carbon.identity.openid4vc.presentation.management</artifactId> | ||
| <scope>provided</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.wso2.carbon.identity.openid4vc</groupId> | ||
| <artifactId>org.wso2.carbon.identity.openid4vc.presentation.common</artifactId> | ||
| <scope>provided</scope> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <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> | ||
| <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> | ||
| </project> |
76 changes: 76 additions & 0 deletions
76
....v1/src/gen/java/org/wso2/carbon/identity/api/server/vp/template/management/v1/Error.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| /* | ||
| * 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.server.vp.template.management.v1; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
|
||
| import io.swagger.annotations.ApiModel; | ||
| import io.swagger.annotations.ApiModelProperty; | ||
|
|
||
| /** | ||
| * Error response model. | ||
| */ | ||
| @ApiModel(description = "Error response") | ||
| public class Error { | ||
|
|
||
| private String code; | ||
| private String message; | ||
| private String description; | ||
| private String traceId; | ||
|
|
||
| @ApiModelProperty(required = true, value = "Error code.") | ||
| @JsonProperty("code") | ||
| public String getCode() { | ||
| return code; | ||
| } | ||
|
|
||
| public void setCode(String code) { | ||
| this.code = code; | ||
| } | ||
|
|
||
| @ApiModelProperty(required = true, value = "Error message.") | ||
| @JsonProperty("message") | ||
| public String getMessage() { | ||
| return message; | ||
| } | ||
|
|
||
| public void setMessage(String message) { | ||
| this.message = message; | ||
| } | ||
|
|
||
| @ApiModelProperty(value = "Error description.") | ||
| @JsonProperty("description") | ||
| public String getDescription() { | ||
| return description; | ||
| } | ||
|
|
||
| public void setDescription(String description) { | ||
| this.description = description; | ||
| } | ||
|
|
||
| @ApiModelProperty(value = "Trace ID for debugging.") | ||
| @JsonProperty("traceId") | ||
| public String getTraceId() { | ||
| return traceId; | ||
| } | ||
|
|
||
| public void setTraceId(String traceId) { | ||
| this.traceId = traceId; | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log Improvement Suggestion No: 1