diff --git a/README.md b/README.md index d7b3f6c..30db314 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ As a student, I want to authenticate using my university account (OpenID Connect As an HR employee, I want to verify the job candidate has a degree from this university. The HR employee needs verification but does not require to see the data. - The sample creates University diplomas as BBS+ verifiable credentials. -- The credentials will be issued using OIDC to a candidate mobile wallet. +- The credentials will be issued using OIDC (If possible) to a candidate mobile wallet. - The Issuer uses a trust registry so that the verifier can validate that the VC is authentic. - The verifier will use BBS+ selective disclosure to validate a diploma. - The university application requires an admin zone and a student zone. diff --git a/src/TrinsicV2WebWallet/GenerateProofService.cs b/src/TrinsicV2WebWallet/GenerateProofService.cs index 80f921b..7107b3c 100644 --- a/src/TrinsicV2WebWallet/GenerateProofService.cs +++ b/src/TrinsicV2WebWallet/GenerateProofService.cs @@ -62,22 +62,21 @@ public async Task CreateProof(string userAuthToken, string // Auth token from user _trinsicService.Options.AuthToken = userAuthToken; - var createProofResponse = await _trinsicService.Credential.CreateProofAsync(new CreateProofRequest + //var createProofResponse = await _trinsicService.Credential.CreateProofAsync(new CreateProofRequest + //{ + // ItemId = credentialItemId, + //}); + + var selectiveProof = await _trinsicService.Credential.CreateProofAsync(new() { ItemId = credentialItemId, + RevealTemplate = new() + { + TemplateAttributes = { "firstName", "lastName", "dateOfBirth", "diplomaTitle" } + } }); - //var selectiveProof = await _trinsicService.Credential.CreateProofAsync(new() - //{ - // DocumentJson = credentialJson.DocumentJson, - // RevealTemplate = new() - // { - // // The other field, not disclosed, is "age" - // TemplateAttributes = { "firstName", "lastName" } - // } - //}); - - return createProofResponse; + return selectiveProof; } public AuthenticateInitResponse AuthenticateInit(string userId, string universityEcosystemId)