-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
378 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
161 changes: 157 additions & 4 deletions
161
LetsEncrypt-SiteExtension/Models/DnsAzureInstallModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,167 @@ | ||
using LetsEncrypt.Azure.Core.Models; | ||
using System; | ||
using LetsEncrypt.Azure.Core.Models; | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace LetsEncrypt.SiteExtension.Models | ||
{ | ||
public class DnsAzureInstallModel | ||
public class DnsAzureInstallModel : IAzureDnsEnvironment | ||
{ | ||
public AzureWebAppEnvironment AzureEnvironment { get; set; } | ||
[Required] | ||
public AzureWebAppEnvironment AzureWebAppEnvironment { get; set; } | ||
|
||
[Required] | ||
public AcmeConfig AcmeConfig { get; set; } | ||
|
||
[Required] | ||
public CertificateServiceSettings CertificateSettings { get; set; } | ||
|
||
public AzureDnsEnvironment AzureDnsEnvironment { get; set; } | ||
/// <summary> | ||
/// The relative record set name. | ||
/// </summary> | ||
[Required] | ||
public string RelativeRecordSetName | ||
{ | ||
get;set; | ||
} | ||
|
||
/// <summary> | ||
/// The zone name. | ||
/// </summary> | ||
[Required] | ||
public string ZoneName | ||
{ | ||
get;set; | ||
} | ||
string resourceGroupName; | ||
|
||
/// <summary> | ||
/// The resource group name defaults to AzureWebAppEnvironment.ResourceGroupName. | ||
/// </summary> | ||
public string ResourceGroupName | ||
{ | ||
get | ||
{ | ||
return resourceGroupName ?? AzureWebAppEnvironment?.ResourceGroupName; | ||
} | ||
set | ||
{ | ||
resourceGroupName = value; | ||
} | ||
} | ||
|
||
string tenant; | ||
/// <summary> | ||
/// Tenant defaults to AzureWebAppEnvironment.Tenant. | ||
/// </summary> | ||
public string Tenant | ||
{ | ||
get | ||
{ | ||
return tenant ?? AzureWebAppEnvironment?.Tenant; | ||
} | ||
set | ||
{ | ||
tenant = value; | ||
} | ||
} | ||
|
||
Guid clientId; | ||
/// <summary> | ||
/// The client id defaults to AzureWebAppEnvironment.ClientId. | ||
/// </summary> | ||
public Guid ClientId | ||
{ | ||
get | ||
{ | ||
return clientId == Guid.Empty ? AzureWebAppEnvironment.ClientId : clientId; | ||
} | ||
set | ||
{ | ||
clientId = value; | ||
} | ||
} | ||
|
||
string clientSecret; | ||
/// <summary> | ||
/// The client secret defaults to AzureWebAppEnvironment.ClientSecret. | ||
/// </summary> | ||
public string ClientSecret | ||
{ | ||
get | ||
{ | ||
return clientSecret ?? AzureWebAppEnvironment?.ClientSecret; | ||
} | ||
set | ||
{ | ||
clientSecret = value; | ||
} | ||
} | ||
|
||
Guid subscriptionId; | ||
|
||
/// <summary> | ||
/// The subscription id defaults to AzureWebAppEnvironment.SubscriptionId. | ||
/// </summary> | ||
public Guid SubscriptionId | ||
{ | ||
get | ||
{ | ||
return subscriptionId == Guid.Empty ? AzureWebAppEnvironment.SubscriptionId : subscriptionId; | ||
} | ||
set | ||
{ | ||
subscriptionId = value; | ||
} | ||
} | ||
|
||
Uri managementEndpoint; | ||
|
||
/// <summary> | ||
/// The management endpoint defaults to AzureWebAppEnvironment.ManagementEndpoint. | ||
/// </summary> | ||
public Uri ManagementEndpoint | ||
{ | ||
get | ||
{ | ||
return managementEndpoint ?? AzureWebAppEnvironment.ManagementEndpoint; | ||
} | ||
set | ||
{ | ||
managementEndpoint = value; | ||
} | ||
} | ||
|
||
Uri tokenAudience; | ||
|
||
/// <summary> | ||
/// The token audience defaults to AzureWebAppEnvironment.TokenAudience. | ||
/// </summary> | ||
public Uri TokenAudience | ||
{ | ||
get | ||
{ | ||
return tokenAudience ?? AzureWebAppEnvironment.TokenAudience; | ||
} | ||
set | ||
{ | ||
tokenAudience = value; | ||
} | ||
} | ||
|
||
Uri authenticationEndpoint; | ||
/// <summary> | ||
/// The authentication endpoint to sign in to. Defaults to AzureWebAppEnvironment.AuthenticationEndpoint. | ||
/// </summary> | ||
public Uri AuthenticationEndpoint | ||
{ | ||
get | ||
{ | ||
return authenticationEndpoint ?? AzureWebAppEnvironment.AuthenticationEndpoint; | ||
} | ||
set | ||
{ | ||
authenticationEndpoint = value; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using LetsEncrypt.Azure.Core.Models; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel.DataAnnotations; | ||
using System.Linq; | ||
using System.Web; | ||
|
||
namespace LetsEncrypt.SiteExtension.Models | ||
{ | ||
public class DnsAzureModel | ||
{ | ||
[Required] | ||
public AzureDnsEnvironment AzureDnsEnvironment { get; set; } | ||
|
||
[Required] | ||
public AcmeConfig AcmeConfig { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
using LetsEncrypt.Azure.Core.Models; | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace LetsEncrypt.SiteExtension.Models | ||
{ | ||
public class HttpKuduInstallModel | ||
{ | ||
[Required] | ||
public AzureWebAppEnvironment AzureEnvironment { get; set; } | ||
|
||
[Required] | ||
public AcmeConfig AcmeConfig { get; set; } | ||
|
||
[Required] | ||
public CertificateServiceSettings CertificateSettings { get; set; } | ||
|
||
[Required] | ||
public AuthorizationChallengeProviderConfig AuthorizationChallengeProviderConfig { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.