Skip to content

Commit

Permalink
fix: DidDocument default context
Browse files Browse the repository at this point in the history
  • Loading branch information
perher committed Oct 5, 2024
1 parent b46a4c1 commit 08c7097
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@JsonDeserialize(builder = DidDocument.Builder.class)
public class DidDocument {

public static final String DID_RESOLUTION_CONTEXT = "https://w3id.org/did-resolution/v1";
public static final String DID_CONTEXT = "https://www.w3.org/ns/did/v1";
private final List<Service> service = new ArrayList<>();
@JsonProperty("@context")
private final List<Object> context = new ArrayList<>();
Expand Down Expand Up @@ -101,8 +101,8 @@ public Builder authentication(List<String> authentication) {
}

public DidDocument build() {
if (!document.context.contains(DID_RESOLUTION_CONTEXT)) {
document.context.add(DID_RESOLUTION_CONTEXT);
if (!document.context.contains(DID_CONTEXT)) {
document.context.add(DID_CONTEXT);
}
return document;
}
Expand Down

0 comments on commit 08c7097

Please sign in to comment.