aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Azure/Tango.AzureUtils/AzureUtilsAuthenticationFactory.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2020-02-04 20:19:42 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2020-02-04 20:19:42 +0200
commit3d589c9f7dddd4c3b77b21fdd9930b6cf3f780ca (patch)
tree20faf3a19037c22519ba65e0e758ca0ec9db737f /Software/Visual_Studio/Azure/Tango.AzureUtils/AzureUtilsAuthenticationFactory.cs
parent5bf3a7b36b3ccc7942f4e8e3fa227a38c04a8451 (diff)
downloadTango-3d589c9f7dddd4c3b77b21fdd9930b6cf3f780ca.tar.gz
Tango-3d589c9f7dddd4c3b77b21fdd9930b6cf3f780ca.zip
Working on azure utils.
Diffstat (limited to 'Software/Visual_Studio/Azure/Tango.AzureUtils/AzureUtilsAuthenticationFactory.cs')
-rw-r--r--Software/Visual_Studio/Azure/Tango.AzureUtils/AzureUtilsAuthenticationFactory.cs24
1 files changed, 18 insertions, 6 deletions
diff --git a/Software/Visual_Studio/Azure/Tango.AzureUtils/AzureUtilsAuthenticationFactory.cs b/Software/Visual_Studio/Azure/Tango.AzureUtils/AzureUtilsAuthenticationFactory.cs
index 4e37be13f..53a725047 100644
--- a/Software/Visual_Studio/Azure/Tango.AzureUtils/AzureUtilsAuthenticationFactory.cs
+++ b/Software/Visual_Studio/Azure/Tango.AzureUtils/AzureUtilsAuthenticationFactory.cs
@@ -11,20 +11,27 @@ namespace Tango.AzureUtils
public class AzureUtilsAuthenticationFactory
{
private static IAzure _azure;
+ private static AzureUtilsCredentials credentials = new AzureUtilsCredentials()
+ {
+ ClientID = "be33437c-5052-449f-ab9d-a88d008eae24",
+ ClientSecret = "bf67fb6f-4d06-4893-988c-6b347aff23d6",
+ TenantID = "2ebd63a5-bc2f-41dc-9066-4409ed5e5dd4",
+ SubscriptionID = "10c8aa60-3b15-4e0d-b412-6aeef90e5e91"
+ };
- public static Task<IAzure> AuthenticateOrGetAsync(AzureUtilsCredentials creds)
+ public static Task<IAzure> AuthenticateOrGetAsync()
{
if (_azure == null)
{
return Task.Factory.StartNew<IAzure>(() =>
{
- var credentials = SdkContext.AzureCredentialsFactory.FromServicePrincipal(
- creds.ClientID,
- creds.ClientSecret,
- creds.TenantID,
+ var creds = SdkContext.AzureCredentialsFactory.FromServicePrincipal(
+ credentials.ClientID,
+ credentials.ClientSecret,
+ credentials.TenantID,
AzureEnvironment.AzureGlobalCloud);
- _azure = Azure.Authenticate(credentials).WithSubscription(creds.SubscriptionID);
+ _azure = Azure.Authenticate(creds).WithSubscription(credentials.SubscriptionID);
return _azure;
});
}
@@ -33,5 +40,10 @@ namespace Tango.AzureUtils
return Task.FromResult(_azure);
}
}
+
+ public static AzureUtilsCredentials GetCredentials()
+ {
+ return credentials;
+ }
}
}