Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion datatypes.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -1835,7 +1835,7 @@
<xs:enumeration value="MSO_MDOC"/>


<xs:enumeration value="SD_JWT"/>
<xs:enumeration value="DC_SD_JWT"/>


</xs:restriction>
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,7 @@ Valid values:

* JWT_VC_JSON
* MSO_MDOC
* SD_JWT
* DC_SD_JWT

### VerifiablePresentationNotice.DcqlQuery

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ public static class Credential {
@JsonProperty("claim_sets")
List<ClaimSet> claimSets;

public static Credential jwtVc(String id, List<String> typeValues) {
public static Credential jwtVcJson(String id, List<String> typeValues) {
return new Credential(id, JWT_VC_JSON, new Meta(typeValues, null, null), null, null);
}

public static Credential mdoc(String id, String doctypeValue) {
return new Credential(id, MSO_MDOC, new Meta(null, doctypeValue, null), null, null);
}

public static Credential sdJwt(String id, List<String> vctValues) {
return new Credential(id, SD_JWT, new Meta(null, null, vctValues), null, null);
public static Credential dcSdJwt(String id, List<String> vctValues) {
return new Credential(id, DC_SD_JWT, new Meta(null, null, vctValues), null, null);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public enum Format {

JWT_VC_JSON("jwt_vc_json"),
MSO_MDOC("mso_mdoc"),
SD_JWT("sd_jwt");
DC_SD_JWT("dc+sd-jwt");

private final String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static class Option {
null,
new DcqlQuery(
List.of(
DcqlQuery.Credential.jwtVc(
DcqlQuery.Credential.dcSdJwt(
"credential1",
List.of("driversLicence")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public void dcqlShouldSerializeCorrectlyAsJson() throws JsonProcessingException
ObjectMapper jsonMapper = new ObjectMapper();

String dcqlJson = jsonMapper.writeValueAsString(dcqlQuery);
String expected = "{\"credentials\":[{\"id\":\"credential1\",\"format\":\"jwt_vc_json\",\"meta\":{\"type_values\":[\"driversLicence\"]},\"claims\":null,\"claim_sets\":null}],\"credential_sets\":null}";
String expected = "{\"credentials\":[{\"id\":\"credential1\",\"format\":\"dc+sd-jwt\",\"meta\":{\"vct_values\":[\"driversLicence\"]},\"claims\":null,\"claim_sets\":null}],\"credential_sets\":null}";

assert dcqlJson.equals(expected);
}
Expand Down