public VerifiableCredentialService( ApiDbContext context, IHttpContextAccessor httpContext, IVerifiableCredentialClient verifiableCredentialClient, IEnrolleeService enrolleeService, ILogger <VerifiableCredentialService> logger) : base(context, httpContext) { _verifiableCredentialClient = verifiableCredentialClient; _enrolleeService = enrolleeService; _logger = logger; }
public VerifiableCredentialService( ApiDbContext context, IHttpContextAccessor httpContext, IMapper mapper, IVerifiableCredentialClient verifiableCredentialClient, IImmunizationClient immunizationClient, IPatientService patientService, ILogger <VerifiableCredentialService> logger) : base(context, httpContext) { _mapper = mapper; _verifiableCredentialClient = verifiableCredentialClient; _immunizationClient = immunizationClient; _logger = logger; }
private async Task <Action> OnApplicationStartedAsync(IVerifiableCredentialClient _verifiableCredentialClient) { var issuerDid = await _verifiableCredentialClient.GetIssuerDidAsync(); var schemaId = await _verifiableCredentialClient.GetSchemaId(issuerDid); if (schemaId == null) { schemaId = await _verifiableCredentialClient.CreateSchemaAsync(); } var credentialDefinitionId = await _verifiableCredentialClient.GetCredentialDefinitionIdAsync(schemaId); if (credentialDefinitionId == null) { credentialDefinitionId = await _verifiableCredentialClient.CreateCredentialDefinitionAsync(schemaId); } return(null); }