internal async Task <SecurityKeyInfo> GetSecurityKeyFromCertificateAsync(Microsoft.Azure.KeyVault.Models.CertificateItem certificateItem)
        {
            var certificateVersionBundle = await this._KeyVaultClient.GetCertificateAsync(certificateItem.Identifier.Identifier);

            var certificatePrivateKeySecretBundle = await this._KeyVaultClient.GetSecretAsync(certificateVersionBundle.SecretIdentifier.Identifier);

            var privateKeyBytes           = Convert.FromBase64String(certificatePrivateKeySecretBundle.Value);
            var certificateWithPrivateKey = new X509Certificate2(privateKeyBytes, (string)null, X509KeyStorageFlags.MachineKeySet);

            return(new SecurityKeyInfo()
            {
                Key = new X509SecurityKey(certificateWithPrivateKey),
                SigningAlgorithm = SecurityAlgorithms.RsaSha512
            });
        }
        internal async Task <SigningCredentials> GetSigningCredentialsFromCertificateAsync(Microsoft.Azure.KeyVault.Models.CertificateItem certificateItem)
        {
            var certificateVersionSecurityKey = await GetSecurityKeyFromCertificateAsync(certificateItem);

            return(new SigningCredentials(certificateVersionSecurityKey.Key, SecurityAlgorithms.RsaSha512));
        }