public async Task <CertificateValidationStatus> ValidateCertificate(IdentityServer.ClientAssertion clientAssertion, string[] chain)
        {
            _logger.LogInformation("ValidateCertificate: {certificatesCount}", chain?.Length);

            var accessToken = await GetAccessToken(clientAssertion).ConfigureAwait(false);

            var status = await _schemeOwnerBaseUrl
                         .AppendPathSegment("certificates/certificate_validation")
                         .WithOAuthBearerToken(accessToken)
                         .PostJsonAsync(chain)
                         .ReceiveJson <CertificateValidationStatus>()
                         .ConfigureAwait(false);

            _logger.LogInformation("CertificateValidationStatus : {status}", status?.Validity);

            if (status == null)
            {
                _logger.LogInformation("Scheme owner communication failed");
                status = new CertificateValidationStatus {
                    Validity = false
                };
            }

            return(status);
        }
        public async Task <CertificateStatus> GetCertificate(IdentityServer.ClientAssertion clientAssertion, string certificateHash)
        {
            var accessToken = await GetAccessToken(clientAssertion).ConfigureAwait(false);

            return(await GetCertificateStatus(accessToken, certificateHash).ConfigureAwait(false));
        }