Esempio n. 1
0
        ///GENMHASH:0202A00A1DCF248D2647DBDBEF2CA865:8B606A8E8FDFF98EAC99D5B0A6FBB7A6
        public async override Task <IAppServiceCertificateOrder> CreateResourceAsync(CancellationToken cancellationToken = default(CancellationToken))
        {
            var certificateOrder = await Manager.Inner.AppServiceCertificateOrders.CreateOrUpdateAsync(ResourceGroupName, Name, Inner);

            Task verifyDomainOwnerShip = null;

            if (domainVerifyWebApp != null)
            {
                verifyDomainOwnerShip = domainVerifyWebApp.VerifyDomainOwnershipAsync(Name, certificateOrder.DomainVerificationToken);
            }
            else if (domainVerifyDomain != null)
            {
                verifyDomainOwnerShip = domainVerifyDomain.VerifyDomainOwnershipAsync(Name, certificateOrder.DomainVerificationToken);
            }
            else
            {
                throw new ArgumentException(
                          $"Please specify a non-null web app or domain to verify the domain ownership for hostname {DistinguishedName()}");
            }
            await verifyDomainOwnerShip;
            var   appServiceCertificateKeyVaultBinding = await CreateKeyVaultBindingAsync(Name, await bindingVault());

            return(this);
        }
Esempio n. 2
0
 ///GENMHASH:6B60EDADBCA134B9C9928244109B6E1B:5781A8E04FCEFEA9CF50B97FD61BE42B
 public async Task VerifyDomainOwnershipAsync(IAppServiceDomain domain, CancellationToken cancellationToken = default(CancellationToken))
 {
     await domain.VerifyDomainOwnershipAsync(Name, DomainVerificationToken(), cancellationToken);
 }