From d7cd052fbf4e97fcf0ba095a71f07386f7367b15 Mon Sep 17 00:00:00 2001 From: Alexandr Morogov <42555001+krankenbro@users.noreply.github.com> Date: Fri, 29 Mar 2024 14:30:54 +0100 Subject: [PATCH] VCI-854: Add switch for user-friendly choose auth provider (#129) --- src/VirtoCommerce.Build/Cloud/Build.SaaS.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/VirtoCommerce.Build/Cloud/Build.SaaS.cs b/src/VirtoCommerce.Build/Cloud/Build.SaaS.cs index 3e3403a..7c7ffbf 100644 --- a/src/VirtoCommerce.Build/Cloud/Build.SaaS.cs +++ b/src/VirtoCommerce.Build/Cloud/Build.SaaS.cs @@ -47,7 +47,23 @@ internal partial class Build [Parameter("SaaS Portal")] public string CloudUrl { get; set; } = "https://portal.virtocommerce.cloud"; [Parameter("SaaS Token")] public string CloudToken { get; set; } [Parameter("Path for the file with SaaS Token")] public string CloudTokenFile { get; set; } = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "vc-build", "cloud"); - [Parameter("SaaS Auth Provider")] public string CloudAuthProvider { get; set; } = "GitHub"; + [Parameter("SaaS Auth Provider")] + public string CloudAuthProvider + { + get + { + if (AzureAD) + { + return nameof(AzureAD); + } + + return cloudAuthProvider; + } + set { cloudAuthProvider = value; } + } + [Parameter("Use Azure AD as SaaS Auth Provider")] public bool AzureAD = false; + private string cloudAuthProvider = "GitHub"; + [Parameter("App Project Name")] public string AppProject { get; set; } [Parameter("Cloud Environment Name")] public string EnvironmentName { get; set; } [Parameter("Cloud Environment Service Plan")] public string ServicePlan { get; set; } = "F1";