Skip to content
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

Support for Subject values #10

Open
stevenvegt opened this issue Nov 5, 2024 · 2 comments
Open

Support for Subject values #10

stevenvegt opened this issue Nov 5, 2024 · 2 comments

Comments

@stevenvegt
Copy link
Member

Add support for Subject fields such as Locality and Organization so we can create VCs a did like this:

{
  "issuer": "did:x509:0:sha256:1b0961059b841654875d24545d0b93b37fd8a50c406a10a89702498f7e544b50::subject:O:De%20Regenboog:L:Hengelo::san:othername:2.16.528.1.1007.99.2110-1-900030787-S-90000380-00.000-11223344",
  "credentialSubject": {
    "subject:O": "De Regenboog",
    "subject:L": "Hengelo",
    "san:otherName": "2.16.528.1.1007.99.2110-1-900030787-S-90000380-00.000-11223344"
  }
}
@woutslakhorst
Copy link
Member

woutslakhorst commented Dec 18, 2024

The policyName/policyValue for the example above is:

subject,O:De%20Regenboog:L:Hengelo

Meaning the value string would have to be split to sub-key/values

@stevenvegt
Copy link
Member Author

stevenvegt commented Dec 18, 2024

DID Syntax:

method-specific-id = ... ("::" policy-name ":" policy-value)

Voor subject policy:

policy-name     = "subject"
policy-value    = key ":" value *(":" key ":" value)

Vertaald naar een credential:

"credentialSubject": {
  $policy-name:$key: $value
}

of nested:

"credentialSubject": {
  $policy-name: {
    $key: $value
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants