Skip to content

Commit

Permalink
Update configuration for different ECO systems
Browse files Browse the repository at this point in the history
  • Loading branch information
damienbod committed Sep 28, 2023
1 parent 61a4b28 commit 0e817a8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/CompanyXHumanResources/DiplomaVerifyService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Text.Json.Nodes;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.Extensions.Configuration;
using Trinsic;
using Trinsic.Services.VerifiableCredentials.V1;

Expand All @@ -14,21 +15,16 @@ public class DiplomaVerifyService
/// This would be some public list of university diploma schemes
/// Don't think this will work because not every uni will used the same SSI, id-tech systems, standards
/// </summary>
public readonly List<SelectListItem> TrustedUniversities = new List<SelectListItem>
{
new SelectListItem { Text ="University SSI Schweiz SSI", Value="did:web:peaceful-booth-zrpufxfp6l3c.connect.trinsic.cloud:zV9t25XybyBV7qEB1v6u9Bb"}
};

public readonly List<SelectListItem> TrustedCredentials = new List<SelectListItem>
{
new SelectListItem { Text ="University SSI Schweiz SSI Diploma", Value= "https://schema.trinsic.cloud/peaceful-booth-zrpufxfp6l3c/diploma-credential-for-swiss-self-sovereign-identity-ssi"},
new SelectListItem { Text ="FH Basel UX Engineer Diploma", Value= "https://schema.trinsic.cloud/peaceful-booth-zrpufxfp6l3c/fh-basel-ux-engineer"}
};
public List<SelectListItem> TrustedUniversities = new();
public List<SelectListItem> TrustedCredentials = new();

public DiplomaVerifyService(TrinsicService trinsicService, IConfiguration configuration)
{
_trinsicService = trinsicService;
_configuration = configuration;

TrustedUniversities = _configuration.GetSection("TrustedUniversities")!.Get<List<SelectListItem>>()!;
TrustedCredentials = _configuration.GetSection("TrustedCredentials")!.Get<List<SelectListItem>>()!;
}

public async Task<(VerifyProofResponse? Proof, bool IsValid)> Verify(string studentProof, string universityIssuer)
Expand Down
16 changes: 16 additions & 0 deletions src/CompanyXHumanResources/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,21 @@
}
]
},
"TrustedUniversities": [
{
"Text": "University SSI Schweiz SSI",
"Value": "did:web:peaceful-booth-zrpufxfp6l3c.connect.trinsic.cloud:zV9t25XybyBV7qEB1v6u9Bb"
}
],
"TrustedCredentials": [
{
"Text": "University SSI Schweiz SSI Diploma",
"Value": "https://schema.trinsic.cloud/peaceful-booth-zrpufxfp6l3c/diploma-credential-for-swiss-self-sovereign-identity-ssi"
},
{
"Text": "FH Basel UX Engineer Diploma",
"Value": "https://schema.trinsic.cloud/peaceful-booth-zrpufxfp6l3c/fh-basel-ux-engineer"
}
],
"AllowedHosts": "*"
}

0 comments on commit 0e817a8

Please sign in to comment.