-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add Employment authorization document test vector. #106
Changes from 2 commits
f8e9ab4
144003a
355257a
2f3ccb1
cbd9731
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<did:key:zDnaegE6RR3atJtHKwTRTWHsJ3kNHqFwv7n9YjTgmU7TyfU76> <https://schema.org/image> <data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2NgUPr/HwADaAIhG61j/AAAAABJRU5ErkJggg==> . | ||
_:c14n0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/citizenship#EmploymentAuthorizationDocumentCredential> . | ||
_:c14n0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.w3.org/2018/credentials#VerifiableCredential> . | ||
_:c14n0 <https://schema.org/description> "Example Country Employment Authorization Document." . | ||
_:c14n0 <https://schema.org/name> "Employment Authorization Document" . | ||
_:c14n0 <https://www.w3.org/2018/credentials#credentialSubject> _:c14n1 . | ||
_:c14n0 <https://www.w3.org/2018/credentials#issuer> <did:key:zDnaegE6RR3atJtHKwTRTWHsJ3kNHqFwv7n9YjTgmU7TyfU76> . | ||
_:c14n0 <https://www.w3.org/2018/credentials#validFrom> "2019-12-03T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> . | ||
_:c14n0 <https://www.w3.org/2018/credentials#validUntil> "2029-12-03T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> . | ||
_:c14n1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://schema.org/Person> . | ||
_:c14n1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/citizenship#EmployablePerson> . | ||
_:c14n1 <https://schema.org/additionalName> "JACOB" . | ||
_:c14n1 <https://schema.org/birthDate> "1999-07-17"^^<http://www.w3.org/2001/XMLSchema#dateTime> . | ||
_:c14n1 <https://schema.org/familyName> "SMITH" . | ||
_:c14n1 <https://schema.org/gender> "Male" . | ||
_:c14n1 <https://schema.org/givenName> "JOHN" . | ||
_:c14n1 <https://schema.org/image> <data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2Ng+M/wHwAEAQH/7yMK/gAAAABJRU5ErkJggg==> . | ||
_:c14n1 <https://w3id.org/citizenship#birthCountry> "Bahamas" . | ||
_:c14n1 <https://w3id.org/citizenship#employmentAuthorizationDocument> _:c14n2 . | ||
_:c14n1 <https://w3id.org/citizenship#residentSince> "2015-01-01"^^<http://www.w3.org/2001/XMLSchema#dateTime> . | ||
_:c14n2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/citizenship#EmploymentAuthorizationDocument> . | ||
_:c14n2 <https://schema.org/identifier> "83627465" . | ||
_:c14n2 <https://w3id.org/citizenship#lprCategory> "C09" . | ||
_:c14n2 <https://w3id.org/citizenship#lprNumber> "999-999-999" . |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bea7b7acfbad0126b135104024a5f1733e705108f42d59668b05c0c50004c6b0e21de16d0139192fe6ea51851d3bb55d55937eb88f80b7f3ba3b79af16bc643f |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
e21de16d0139192fe6ea51851d3bb55d55937eb88f80b7f3ba3b79af16bc643f |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
_:c14n0 <http://purl.org/dc/terms/created> "2023-02-24T23:36:38Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> . | ||
_:c14n0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/security#DataIntegrityProof> . | ||
_:c14n0 <https://w3id.org/security#cryptosuite> "eddsa-rdfc-2022"^^<https://w3id.org/security#cryptosuiteString> . | ||
_:c14n0 <https://w3id.org/security#proofPurpose> <https://w3id.org/security#assertionMethod> . | ||
_:c14n0 <https://w3id.org/security#verificationMethod> <did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2#z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2> . |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"type": "DataIntegrityProof", | ||
"cryptosuite": "eddsa-rdfc-2022", | ||
"created": "2023-02-24T23:36:38Z", | ||
"verificationMethod": "did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2#z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2", | ||
"proofPurpose": "assertionMethod", | ||
"@context": [ | ||
"https://www.w3.org/ns/credentials/v2", | ||
"https://w3id.org/citizenship/v4rc1" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bea7b7acfbad0126b135104024a5f1733e705108f42d59668b05c0c50004c6b0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
z64e3a7hAtYQ3pqCdBsPLRpNqJd5YTzbMP7WrotbqY7HtANPq3ZSYoycsz3tHxzqJM5GVR5bUk7TpjoxgdUDXMQaR |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fd390da7cb1fb09628217967dd67b0cbcc8fd00a9eb4f7cc90561b0695380b603d856b9663b53c69e78f4004b67e2d1b06a8dd00e424e779ff52203767f0840e |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"@context": [ | ||
"https://www.w3.org/ns/credentials/v2", | ||
"https://w3id.org/citizenship/v4rc1" | ||
], | ||
"type": [ | ||
"VerifiableCredential", | ||
"EmploymentAuthorizationDocumentCredential" | ||
], | ||
"issuer": { | ||
"id": "did:key:zDnaegE6RR3atJtHKwTRTWHsJ3kNHqFwv7n9YjTgmU7TyfU76", | ||
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2NgUPr/HwADaAIhG61j/AAAAABJRU5ErkJggg==" | ||
}, | ||
"credentialSubject": { | ||
"type": [ | ||
"Person", | ||
"EmployablePerson" | ||
], | ||
"givenName": "JOHN", | ||
"additionalName": "JACOB", | ||
"familyName": "SMITH", | ||
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2Ng+M/wHwAEAQH/7yMK/gAAAABJRU5ErkJggg==", | ||
"gender": "Male", | ||
"residentSince": "2015-01-01", | ||
"birthCountry": "Bahamas", | ||
"birthDate": "1999-07-17", | ||
"employmentAuthorizationDocument": { | ||
"type": "EmploymentAuthorizationDocument", | ||
"identifier": "83627465", | ||
"lprCategory": "C09", | ||
"lprNumber": "999-999-999" | ||
} | ||
}, | ||
"name": "Employment Authorization Document", | ||
"description": "Example Country Employment Authorization Document.", | ||
"validFrom": "2019-12-03T00:00:00Z", | ||
"validUntil": "2029-12-03T00:00:00Z", | ||
"proof": { | ||
"type": "DataIntegrityProof", | ||
"cryptosuite": "eddsa-rdfc-2022", | ||
"created": "2023-02-24T23:36:38Z", | ||
"verificationMethod": "did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2#z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2", | ||
"proofPurpose": "assertionMethod", | ||
"proofValue": "z64e3a7hAtYQ3pqCdBsPLRpNqJd5YTzbMP7WrotbqY7HtANPq3ZSYoycsz3tHxzqJM5GVR5bUk7TpjoxgdUDXMQaR" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,38 @@ | ||||||
{ | ||||||
"@context": [ | ||||||
"https://www.w3.org/ns/credentials/v2", | ||||||
"https://w3id.org/citizenship/v4rc1" | ||||||
], | ||||||
"type": [ | ||||||
"VerifiableCredential", | ||||||
"EmploymentAuthorizationDocumentCredential" | ||||||
], | ||||||
"issuer": { | ||||||
"id": "did:key:zDnaegE6RR3atJtHKwTRTWHsJ3kNHqFwv7n9YjTgmU7TyfU76", | ||||||
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2NgUPr/HwADaAIhG61j/AAAAABJRU5ErkJggg==" | ||||||
}, | ||||||
"credentialSubject": { | ||||||
"type": [ | ||||||
"Person", | ||||||
"EmployablePerson" | ||||||
], | ||||||
"givenName": "JOHN", | ||||||
"additionalName": "JACOB", | ||||||
"familyName": "SMITH", | ||||||
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2Ng+M/wHwAEAQH/7yMK/gAAAABJRU5ErkJggg==", | ||||||
"gender": "Male", | ||||||
"residentSince": "2015-01-01", | ||||||
"birthCountry": "Bahamas", | ||||||
"birthDate": "1999-07-17", | ||||||
"employmentAuthorizationDocument": { | ||||||
"type": "EmploymentAuthorizationDocument", | ||||||
"identifier": "83627465", | ||||||
"lprCategory": "C09", | ||||||
"lprNumber": "999-999-999" | ||||||
} | ||||||
}, | ||||||
"name": "Employment Authorization Document", | ||||||
"description": "Example Country Employment Authorization Document.", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as above There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @TallTed so this ends up being no change. Is this what you wanted? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I don't understand how it ends up being no change. All the earlier comments on this PR have what I believe to be editorial changes, reducing strings of 4, 5, 6 nouns to 3, 2, 1 noun, to ease comprehension by non-native English speakers and by various software tools. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm fine with whatever @TallTed wants as a description here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Wind4Greg — The gist is "don't use a sequence of 3 or more nouns to identify something". Doing this makes comprehending and using the document more difficult for non-native English speakers (and even many native English speakers), as well as those using various accessibility tools. This is an example:
Suggested change
I'll go make specific suggestions where I had earlier said "as above". I do all my work through GitHub's web interface, so I cannot compute the text vectors. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll go with |
||||||
"validFrom": "2019-12-03T00:00:00Z", | ||||||
"validUntil": "2029-12-03T00:00:00Z" | ||||||
} |
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.
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.
or
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.
@TallTed, @dlongley or @msporny I took the unsigned inputs from the VC playground with some modifications (removed render method, substituted single pixel image for long PNG). Any changes to the input JSON file requires rerunning test vector generation code and changes derived/generated test vectors. Can folks come to an agreement on any changes to inputs (or not) then I will rerun the vectors.
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.
I'm fine with changing this description as @TallTed recommends.
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.
Might as well just simplify to
Example Employment Authorization Document
.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.
@TallTed are you okay with @dlongley suggestion or your original suggestion. Let me know then I'll rerun the code to generate the test vectors.
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.
I think the background on the language there is it started as "[Country Name] Employment Authorization Document". Some other examples we have would use "Utopia" there. Real country names would be similar. It wasn't originally intended to be "Example [Country Name] EAD", but I see how it looks like that now and is a bit awkward. It's only an example so hopefully anyone that copies whatever ends up here will adjust as needed.
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.
I'm OK with @dlongley's simplification. It might be better to quote the identifier of the thing being modified by "Example", as --