Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
25 changes: 25 additions & 0 deletions credentials/utopia-agency-employee-badge/credential.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://w3id.org/identification/v1rc1",
{
"agency": "https://schema.org/memberOf"
}

@msporny msporny Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not be inlining context values in long-lived examples.

],
"id": "urn:uuid:b3d7c2e1-4f5a-6b7c-8d9e-0a1b2c3d4e5f",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"id": "urn:uuid:b3d7c2e1-4f5a-6b7c-8d9e-0a1b2c3d4e5f",

Not needed, either.

"type": ["VerifiableCredential", "IdentificationDocumentCredential"],
"name": "Utopia Agency Employee Badge",
"issuer": {
"id": "https://www.utopia-records.example",

@msporny msporny Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"id": "https://www.utopia-records.example",
"id": "https://employment.utopia.example",

"name": "Utopia Central Records Office"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"name": "Utopia Central Records Office"
"name": "Utopia Employment Agency"

},
"validFrom": "2026-01-15T00:00:00Z",
"validUntil": "2028-01-14T23:59:59Z",
"credentialSubject": {
"id": "urn:uuid:d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f9a",

@msporny msporny Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"id": "urn:uuid:d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f9a",

Don't use unique identifiers for people unless absolutely necessary, it creates a tracking vector for the person.

"type": "Person",
"givenName": "Jordan",
"familyName": "Casey",
"agency": "Utopia Department of Parks and Recreation"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"agency": "Utopia Department of Parks and Recreation"
"worksFor": {
"id": "https://parks.utopia.example/",
"name": "Utopia Department of Parks and Recreation"
}

}
}
19 changes: 19 additions & 0 deletions credentials/utopia-agency-employee-badge/queries.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{

@bparth24 bparth24 Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@applesnort cc: @BigBlueHat @jameseaster

I would suggest to follow the structure for queries.json file from existing examples in the repo

an example:

{
  "default": {
    "type": "QueryByExample",
    "credentialQuery": [
      {
        "reason": "Please present your IdentificationDocumentCredential Verifiable Credential(s) to complete the verification process.",
        "example": {
          "@context": [
            "https://www.w3.org/ns/credentials/v2",
            "https://w3id.org/identification/v1rc1"
          ],
          "type": [
            "IdentificationDocumentCredential"
          ]
        },
        "acceptedCryptosuites": [
          "Ed25519Signature2020",
          "eddsa-rdfc-2022",
          "ecdsa-rdfc-2019",
          "bbs-2023",
          "ecdsa-sd-2023"
        ]
      }
    ]
  }
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this, because you're looking for a very specific type of identification badge that specifies that the individual works for a particular agency.

    "worksFor": {
      "id": "https://parks.utopia.example/"
    }

"web": {
"VerifiablePresentation": {
"query": [{
"type": "QueryByExample",
"credentialQuery": [{
"reason": "An Agency Employee Badge is required.",
"example": {
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://w3id.org/identification/v1rc1"
],
"type": "IdentificationDocumentCredential"
}
}]
}]
}
}
}