|
3 | 3 | Verifiable Credentials with Linked Data Proofs: |
4 | 4 |
|
5 | 5 | ### Example Verifiable Credential |
6 | | - |
7 | | - { |
8 | | - "@context" : [ "https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/examples/v1" ], |
9 | | - "type" : [ "VerifiableCredential", "UniversityDegreeCredential" ], |
10 | | - "id" : "http://example.edu/credentials/3732", |
11 | | - "issuer" : "did:example:76e12ec712ebc6f1c221ebfeb1f", |
12 | | - "issuanceDate" : "2019-06-16T18:56:59Z", |
13 | | - "expirationDate" : "2019-06-17T18:56:59Z", |
14 | | - "credentialSubject" : { |
15 | | - "id" : "did:example:ebfeb1f712ebc6f1c276e12ec21", |
16 | | - "college" : "Test University", |
17 | | - "degree" : { |
18 | | - "name" : "Bachelor of Science and Arts", |
19 | | - "type" : "BachelorDegree" |
20 | | - } |
21 | | - }, |
22 | | - "proof" : { |
23 | | - "type" : "Ed25519Signature2018", |
24 | | - "created" : "2020-10-15T09:44:25Z", |
25 | | - "domain" : "example.com", |
26 | | - "nonce" : "343s$FSFDa-", |
27 | | - "proofPurpose" : "assertionMethod", |
28 | | - "verificationMethod" : "did:example:76e12ec712ebc6f1c221ebfeb1f#keys-1", |
29 | | - "jws" : "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..yJbi7RlKaNTNf3lhaOXUotKUNBg9N4llcD7--QRFYid_WjRcAovU-qOqtlVWngL_6vbjZWeBCRG-fv2Q9o4_CQ" |
30 | | - } |
31 | | - } |
| 6 | + { |
| 7 | + "@context" : [ "https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/examples/v1" ], |
| 8 | + "type" : [ "VerifiableCredential", "UniversityDegreeCredential" ], |
| 9 | + "id" : "http://example.edu/credentials/3732", |
| 10 | + "issuer" : "did:example:76e12ec712ebc6f1c221ebfeb1f", |
| 11 | + "issuanceDate" : "2019-06-16T18:56:59Z", |
| 12 | + "expirationDate" : "2019-06-17T18:56:59Z", |
| 13 | + "credentialSubject" : { |
| 14 | + "id" : "did:example:ebfeb1f712ebc6f1c276e12ec21", |
| 15 | + "college" : "Test University", |
| 16 | + "degree" : { |
| 17 | + "name" : "Bachelor of Science and Arts", |
| 18 | + "type" : "BachelorDegree" |
| 19 | + } |
| 20 | + }, |
| 21 | + "proof" : { |
| 22 | + "type" : "Ed25519Signature2018", |
| 23 | + "created" : "2021-11-17T22:20:27Z", |
| 24 | + "proofPurpose" : "assertionMethod", |
| 25 | + "verificationMethod" : "did:example:76e12ec712ebc6f1c221ebfeb1f#keys-1", |
| 26 | + "jws" : "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..JNerzfrK46Mq4XxYZEnY9xOK80xsEaWCLAHuZsFie1-NTJD17wWWENn_DAlA_OwxGF5dhxUJ05P6Dm8lcmF5Cg" |
| 27 | + } |
| 28 | + } |
32 | 29 |
|
33 | 30 | Process finished with exit code 0 |
34 | 31 |
|
@@ -62,8 +59,6 @@ Process finished with exit code 0 |
62 | 59 | signer.setCreated(new Date()); |
63 | 60 | signer.setProofPurpose(LDSecurityKeywords.JSONLD_TERM_ASSERTIONMETHOD); |
64 | 61 | signer.setVerificationMethod(URI.create("did:example:76e12ec712ebc6f1c221ebfeb1f#keys-1")); |
65 | | - signer.setDomain("example.com"); |
66 | | - signer.setNonce("343s$FSFDa-"); |
67 | 62 | LdProof ldProof = signer.sign(verifiableCredential); |
68 | 63 |
|
69 | 64 | System.out.println(verifiableCredential.toJson(true)); |
|
0 commit comments