aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Web/Tango.MachineService.Gateway
diff options
context:
space:
mode:
authorMirta <mirta@twine-s.com>2020-12-30 14:27:05 +0200
committerMirta <mirta@twine-s.com>2020-12-30 14:27:05 +0200
commit1344a54c37f7cbba7a294674b4b733d72ee257ea (patch)
tree4b24c6fa78d7648f4bb7cefafa464bb0b063fec4 /Software/Visual_Studio/Web/Tango.MachineService.Gateway
parent124ad4150f80c6846fdee41dbbda9848c105f6e5 (diff)
parent281610ac56799f6870c587a942495d91cd55b227 (diff)
downloadTango-1344a54c.tar.gz
Tango-1344a54c.zip
Hope it is fine
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.MachineService.Gateway')
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/App_Start/BundleConfig.cs14
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/App_Start/FilterConfig.cs13
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/App_Start/RouteConfig.cs23
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/App_Start/WebApiConfig.cs23
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/AzureUtilsController.cs59
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/GatewayController.cs41
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/HomeController.cs16
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/ValuesController.cs39
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/DB/ENVIRONMENT.cs30
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/DB/GatewayDbContext.cs38
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/DTO/EnvironmentConfiguration.cs16
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/Filters/JwtTokenFilter.cs60
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/GatewayConfig.cs24
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/Global.asax1
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/Global.asax.cs56
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/Messages/EnvironmentsRequest.cs12
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/Messages/EnvironmentsResponse.cs17
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/Nswag/GatewayClient.nswag140
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/Properties/AssemblyInfo.cs35
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/Properties/PublishProfiles/machineservice-gateway - Web Deploy.pubxml28
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/Tango.MachineService.Gateway.csproj350
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/TangoController.cs125
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/Views/Web.config43
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/Views/_ViewStart.cshtml3
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/Web.Debug.config30
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/Web.Release.config31
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/Web.config114
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/WebToken.cs192
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService.Gateway/packages.config57
29 files changed, 0 insertions, 1630 deletions
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/App_Start/BundleConfig.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/App_Start/BundleConfig.cs
deleted file mode 100644
index 68d6937d9..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/App_Start/BundleConfig.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System.Web;
-using System.Web.Optimization;
-
-namespace Tango.MachineService.Gateway
-{
- public class BundleConfig
- {
- // For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862
- public static void RegisterBundles(BundleCollection bundles)
- {
-
- }
- }
-}
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/App_Start/FilterConfig.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/App_Start/FilterConfig.cs
deleted file mode 100644
index a915cef9e..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/App_Start/FilterConfig.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System.Web;
-using System.Web.Mvc;
-
-namespace Tango.MachineService.Gateway
-{
- public class FilterConfig
- {
- public static void RegisterGlobalFilters(GlobalFilterCollection filters)
- {
- filters.Add(new HandleErrorAttribute());
- }
- }
-}
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/App_Start/RouteConfig.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/App_Start/RouteConfig.cs
deleted file mode 100644
index 1adc877c0..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/App_Start/RouteConfig.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.Mvc;
-using System.Web.Routing;
-
-namespace Tango.MachineService.Gateway
-{
- public class RouteConfig
- {
- public static void RegisterRoutes(RouteCollection routes)
- {
- routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
-
- routes.MapRoute(
- name: "Default",
- url: "{controller}/{action}/{id}",
- defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
- );
- }
- }
-}
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/App_Start/WebApiConfig.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/App_Start/WebApiConfig.cs
deleted file mode 100644
index d3bc653da..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/App_Start/WebApiConfig.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web.Http;
-
-namespace Tango.MachineService.Gateway
-{
- public static class WebApiConfig
- {
- public static void Register(HttpConfiguration config)
- {
- // Web API configuration and services
-
- // Web API routes
- config.MapHttpAttributeRoutes();
-
- config.Routes.MapHttpRoute(
- name: "API Default",
- routeTemplate: "api/{controller}/{action}/{id}",
- defaults: new { id = RouteParameter.Optional });
- }
- }
-}
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/AzureUtilsController.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/AzureUtilsController.cs
deleted file mode 100644
index ae5aa4543..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/AzureUtilsController.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-using Microsoft.IdentityModel.Clients.ActiveDirectory;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Security.Authentication;
-using System.Threading.Tasks;
-using System.Web;
-using System.Web.Mvc;
-using Tango.AzureUtils;
-using Tango.AzureUtils.Web;
-using Tango.MachineService.Gateway.Filters;
-using Tango.Web.Controllers;
-using Tango.Web.Security;
-
-namespace Tango.MachineService.Gateway.Controllers
-{
- public class AzureUtilsController : TangoController<AzureUtilsController.TokenObject>
- {
- public class TokenObject
- {
- public String Email { get; set; }
- }
-
- [HttpPost]
- public async Task<LoginResponse> Login(LoginRequest request)
- {
- var azure = await AzureUtils.AzureUtilsAuthenticationFactory.AuthenticateOrGetAsync();
- AzureUtils.ActiveDirectory.ActiveDirectoryManager adManager = new AzureUtils.ActiveDirectory.ActiveDirectoryManager(azure);
-
- try
- {
- await adManager.Authenticate(request.Email, request.Password);
- }
- catch (Exception ex)
- {
- throw new AuthenticationException("The specified email or password is incorrect.", ex);
- }
-
- if (!adManager.IsUserMemberOf(GatewayConfig.AZURE_UTILS_GROUP, request.Email))
- {
- throw new AuthenticationException("The specified user is not authorized to access the resource.");
- }
-
- return new LoginResponse()
- {
- AccessToken = WebToken<TokenObject>.CreateNew(GatewayConfig.JWT_TOKEN_SECRET, new TokenObject()
- {
- Email = request.Email,
- }, DateTime.UtcNow.AddDays(1)).AccessToken,
- };
- }
-
- [JwtTokenFilter]
- public AzureUtilsCredentials GetCredentials()
- {
- return AzureUtils.AzureUtilsAuthenticationFactory.GetGlobalCredentials();
- }
- }
-} \ No newline at end of file
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/GatewayController.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/GatewayController.cs
deleted file mode 100644
index e393c7264..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/GatewayController.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
-using System.Net.Http;
-using System.Web.Http;
-using Tango.MachineService.Gateway.DB;
-using Tango.MachineService.Gateway.DTO;
-using Tango.MachineService.Gateway.Messages;
-using Tango.Web.Controllers;
-
-namespace Tango.MachineService.Gateway.Controllers
-{
- public class GatewayController : TangoController
- {
- [HttpPost]
- public EnvironmentsResponse GetEnvironments(EnvironmentsRequest request)
- {
- EnvironmentsResponse response = new EnvironmentsResponse();
-
- using (GatewayDbContext db = GatewayDbContext.CreateDefault())
- {
- var envs = db.Environments.Where(x => x.Active).ToList();
-
- foreach (var env in envs)
- {
- response.Environments.Add(new EnvironmentConfiguration()
- {
- ID = env.ID.ToString(),
- Name = env.Name,
- Description = env.Description,
- MachineServiceAddress = env.MachineServiceAddress,
- DisplayIndex = env.DisplayIndex
- });
- }
- }
-
- return response;
- }
- }
-}
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/HomeController.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/HomeController.cs
deleted file mode 100644
index f510f360c..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/HomeController.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.Mvc;
-
-namespace Tango.MachineService.Gateway.Controllers
-{
- public class HomeController : Controller
- {
- public String Index()
- {
- return "Twine Gateway Service";
- }
- }
-}
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/ValuesController.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/ValuesController.cs
deleted file mode 100644
index 2c742706e..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/ValuesController.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
-using System.Net.Http;
-using System.Web.Http;
-
-namespace Tango.MachineService.Gateway.Controllers
-{
- public class ValuesController : ApiController
- {
- // GET api/values
- public IEnumerable<string> Get()
- {
- return new string[] { "value1", "value2" };
- }
-
- // GET api/values/5
- public string Get(int id)
- {
- return "value";
- }
-
- // POST api/values
- public void Post([FromBody]string value)
- {
- }
-
- // PUT api/values/5
- public void Put(int id, [FromBody]string value)
- {
- }
-
- // DELETE api/values/5
- public void Delete(int id)
- {
- }
- }
-}
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/DB/ENVIRONMENT.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/DB/ENVIRONMENT.cs
deleted file mode 100644
index 7ab5bddbc..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/DB/ENVIRONMENT.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Linq;
-using System.Web;
-
-namespace Tango.MachineService.Gateway.DB
-{
- [Table("ENVIRONMENTS")]
- public class Environment
- {
- [Column("ID")]
- public int ID { get; set; }
-
- [Column("NAME")]
- public String Name { get; set; }
-
- [Column("DESCRIPTION")]
- public String Description { get; set; }
-
- [Column("MACHINE_SERVICE_ADDRESS")]
- public String MachineServiceAddress { get; set; }
-
- [Column("DISPLAY_INDEX")]
- public int DisplayIndex { get; set; }
-
- [Column("ACTIVE")]
- public bool Active { get; set; }
- }
-} \ No newline at end of file
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/DB/GatewayDbContext.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/DB/GatewayDbContext.cs
deleted file mode 100644
index 9f4a9f0f9..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/DB/GatewayDbContext.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Data.Entity;
-using System.Linq;
-using System.Web;
-using Tango.Core;
-
-namespace Tango.MachineService.Gateway.DB
-{
- public class GatewayDbContext : DbContext
- {
- public GatewayDbContext(DataSource dataSource) : base(dataSource.ToConnection(), true)
- {
-
- }
-
- public static GatewayDbContext CreateDefault()
- {
- return new GatewayDbContext(new DataSource()
- {
- Address = GatewayConfig.DB_ADDRESS,
- IntegratedSecurity = false,
- Catalog = GatewayConfig.DB_CATALOG,
- Type = DataSourceType.SQLServer,
- UserName = GatewayConfig.DB_USER_NAME,
- Password = GatewayConfig.DB_PASSWORD
- });
- }
-
- /// <summary>
- /// Gets or sets the environments.
- /// </summary>
- public DbSet<Environment> Environments
- {
- get; set;
- }
- }
-} \ No newline at end of file
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/DTO/EnvironmentConfiguration.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/DTO/EnvironmentConfiguration.cs
deleted file mode 100644
index 25ba9ba3d..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/DTO/EnvironmentConfiguration.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-
-namespace Tango.MachineService.Gateway.DTO
-{
- public class EnvironmentConfiguration
- {
- public String ID { get; set; }
- public String Name { get; set; }
- public String Description { get; set; }
- public String MachineServiceAddress { get; set; }
- public int DisplayIndex { get; set; }
- }
-} \ No newline at end of file
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Filters/JwtTokenFilter.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Filters/JwtTokenFilter.cs
deleted file mode 100644
index 841fd6baa..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Filters/JwtTokenFilter.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
-using System.Net.Http;
-using System.Security.Authentication;
-using System.Web;
-using System.Web.Http;
-using System.Web.Http.Controllers;
-using System.Web.Http.Filters;
-using Tango.Web.Security;
-
-namespace Tango.MachineService.Gateway.Filters
-{
- public class JwtTokenFilter : ActionFilterAttribute
- {
- public bool AllowExpired { get; private set; }
-
- public JwtTokenFilter()
- {
-
- }
-
- public JwtTokenFilter(bool allowExpired)
- {
- AllowExpired = allowExpired;
- }
-
- public override void OnActionExecuting(HttpActionContext actionContext)
- {
- var authorizationHeader = actionContext.Request.Headers.Authorization;
-
- if (authorizationHeader != null && authorizationHeader.Parameter != null)
- {
- try
- {
- WebToken.Validate(GatewayConfig.JWT_TOKEN_SECRET, authorizationHeader.Parameter);
- }
- catch (JWT.TokenExpiredException)
- {
- if (!AllowExpired)
- {
- throw new AuthenticationException("Token expired.");
- }
- }
- catch (JWT.SignatureVerificationException)
- {
- throw new AuthenticationException("Invalid token.");
- }
- }
- else
- {
- throw new AuthenticationException("No token specified.");
- }
-
- base.OnActionExecuting(actionContext);
- }
- }
-} \ No newline at end of file
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/GatewayConfig.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/GatewayConfig.cs
deleted file mode 100644
index dbbb10709..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/GatewayConfig.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Linq;
-using System.Web;
-using Tango.Web;
-
-namespace Tango.MachineService.Gateway
-{
- public class GatewayConfig
- {
- public static String DB_ADDRESS => ConfigurationManager.AppSettings[nameof(DB_ADDRESS)].ToString();
- public static String DB_USER_NAME => ConfigurationManager.AppSettings[nameof(DB_USER_NAME)].ToString();
- public static String DB_PASSWORD => ConfigurationManager.AppSettings[nameof(DB_PASSWORD)].ToString();
- public static String DB_CATALOG => ConfigurationManager.AppSettings[nameof(DB_CATALOG)].ToString();
-
- public static String JWT_TOKEN_SECRET => ConfigurationManager.AppSettings[nameof(JWT_TOKEN_SECRET)].ToString();
- public static String AZURE_UTILS_GROUP => ConfigurationManager.AppSettings[nameof(AZURE_UTILS_GROUP)].ToString();
- public static String TENANT_ID => ConfigurationManager.AppSettings[nameof(TENANT_ID)].ToString();
- public static String CLIENT_ID => ConfigurationManager.AppSettings[nameof(CLIENT_ID)].ToString();
- public static String CLIENT_SECRET => ConfigurationManager.AppSettings[nameof(CLIENT_SECRET)].ToString();
- public static String SUBSCRIPTION_ID => ConfigurationManager.AppSettings[nameof(SUBSCRIPTION_ID)].ToString();
- }
-} \ No newline at end of file
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Global.asax b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Global.asax
deleted file mode 100644
index badf913e2..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Global.asax
+++ /dev/null
@@ -1 +0,0 @@
-<%@ Application Codebehind="Global.asax.cs" Inherits="Tango.MachineService.Gateway.WebApiApplication" Language="C#" %>
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Global.asax.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Global.asax.cs
deleted file mode 100644
index 52b370236..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Global.asax.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.Http;
-using System.Web.Http.Filters;
-using System.Web.Mvc;
-using System.Web.Optimization;
-using System.Web.Routing;
-using Tango.Logging;
-
-namespace Tango.MachineService.Gateway
-{
- public class WebApiApplication : System.Web.HttpApplication
- {
- protected void Application_Start()
- {
- LogManager.Default.Categories.Add(LogCategory.Debug);
- //LogManager.Default.RegisterLogger(new AzureCloudLogger());
- GlobalConfiguration.Configuration.Filters.Add(new LogExceptionFilterAttribute());
-
- LogManager.Default.Log("Application Started!");
-
- //AreaRegistration.RegisterAllAreas();
- GlobalConfiguration.Configure(WebApiConfig.Register);
- FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
- RouteConfig.RegisterRoutes(RouteTable.Routes);
- BundleConfig.RegisterBundles(BundleTable.Bundles);
-
- AzureUtils.AzureUtilsAuthenticationFactory.SetGlobalCredentials(new AzureUtils.AzureUtilsCredentials()
- {
- ClientID = GatewayConfig.CLIENT_ID,
- ClientSecret = GatewayConfig.CLIENT_SECRET,
- TenantID = GatewayConfig.TENANT_ID,
- SubscriptionID = GatewayConfig.SUBSCRIPTION_ID
- });
- }
-
- public class LogExceptionFilterAttribute : ExceptionFilterAttribute
- {
- public override void OnException(HttpActionExecutedContext context)
- {
- LogManager.Default.Log(context.Exception);
- }
- }
-
- protected void Application_Error(object sender, EventArgs e)
- {
- Exception exception = Server.GetLastError();
- if (exception != null)
- {
- LogManager.Default.Log(exception, "Global Exception!");
- }
- }
- }
-}
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Messages/EnvironmentsRequest.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Messages/EnvironmentsRequest.cs
deleted file mode 100644
index 6d2ab0f8d..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Messages/EnvironmentsRequest.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-
-namespace Tango.MachineService.Gateway.Messages
-{
- public class EnvironmentsRequest
- {
- public String AppSecret { get; set; }
- }
-} \ No newline at end of file
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Messages/EnvironmentsResponse.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Messages/EnvironmentsResponse.cs
deleted file mode 100644
index 2063d5e59..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Messages/EnvironmentsResponse.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using Tango.MachineService.Gateway.DTO;
-
-namespace Tango.MachineService.Gateway.Messages
-{
- public class EnvironmentsResponse
- {
- public List<EnvironmentConfiguration> Environments { get; set; }
-
- public EnvironmentsResponse()
- {
- Environments = new List<EnvironmentConfiguration>();
- }
- }
-} \ No newline at end of file
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Nswag/GatewayClient.nswag b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Nswag/GatewayClient.nswag
deleted file mode 100644
index d3db33524..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Nswag/GatewayClient.nswag
+++ /dev/null
@@ -1,140 +0,0 @@
-{
- "runtime": "Default",
- "defaultVariables": "",
- "documentGenerator": {
- "webApiToOpenApi": {
- "controllerNames": [
- "Tango.MachineService.Gateway.Controllers.GatewayController"
- ],
- "isAspNetCore": false,
- "resolveJsonOptions": false,
- "defaultUrlTemplate": "api/{controller}/{action}",
- "addMissingPathParameters": false,
- "includedVersions": null,
- "defaultPropertyNameHandling": "Default",
- "defaultReferenceTypeNullHandling": "Null",
- "defaultDictionaryValueReferenceTypeNullHandling": "NotNull",
- "defaultResponseReferenceTypeNullHandling": "NotNull",
- "defaultEnumHandling": "Integer",
- "flattenInheritanceHierarchy": false,
- "generateKnownTypes": true,
- "generateEnumMappingDescription": false,
- "generateXmlObjects": false,
- "generateAbstractProperties": false,
- "generateAbstractSchemas": true,
- "ignoreObsoleteProperties": false,
- "allowReferencesWithProperties": false,
- "excludedTypeNames": [],
- "serviceHost": null,
- "serviceBasePath": null,
- "serviceSchemes": [],
- "infoTitle": "My Title",
- "infoDescription": null,
- "infoVersion": "1.0.0",
- "documentTemplate": null,
- "documentProcessorTypes": [],
- "operationProcessorTypes": [],
- "typeNameGeneratorType": null,
- "schemaNameGeneratorType": null,
- "contractResolverType": null,
- "serializerSettingsType": null,
- "useDocumentProvider": true,
- "documentName": "v1",
- "aspNetCoreEnvironment": null,
- "createWebHostBuilderMethod": null,
- "startupType": null,
- "allowNullableBodyParameters": true,
- "output": null,
- "outputType": "Swagger2",
- "assemblyPaths": [
- "$(assembly)"
- ],
- "assemblyConfig": null,
- "referencePaths": [],
- "useNuGetCache": false
- }
- },
- "codeGenerators": {
- "openApiToCSharpClient": {
- "clientBaseClass": null,
- "configurationClass": null,
- "generateClientClasses": true,
- "generateClientInterfaces": false,
- "injectHttpClient": true,
- "disposeHttpClient": true,
- "protectedMethods": [],
- "generateExceptionClasses": true,
- "exceptionClass": "ApiException",
- "wrapDtoExceptions": true,
- "useHttpClientCreationMethod": false,
- "httpClientType": "System.Net.Http.HttpClient",
- "useHttpRequestMessageCreationMethod": false,
- "useBaseUrl": true,
- "generateBaseUrlProperty": true,
- "generateSyncMethods": true,
- "exposeJsonSerializerSettings": false,
- "clientClassAccessModifier": "public",
- "typeAccessModifier": "public",
- "generateContractsOutput": false,
- "contractsNamespace": null,
- "contractsOutputFilePath": null,
- "parameterDateTimeFormat": "s",
- "parameterDateFormat": "yyyy-MM-dd",
- "generateUpdateJsonSerializerSettingsMethod": true,
- "useRequestAndResponseSerializationSettings": false,
- "serializeTypeInformation": false,
- "queryNullValue": "",
- "className": "GatewayClient",
- "operationGenerationMode": "MultipleClientsFromOperationId",
- "additionalNamespaceUsages": [],
- "additionalContractNamespaceUsages": [],
- "generateOptionalParameters": false,
- "generateJsonMethods": false,
- "enforceFlagEnums": false,
- "parameterArrayType": "System.Collections.Generic.IEnumerable",
- "parameterDictionaryType": "System.Collections.Generic.IDictionary",
- "responseArrayType": "System.Collections.Generic.ICollection",
- "responseDictionaryType": "System.Collections.Generic.IDictionary",
- "wrapResponses": false,
- "wrapResponseMethods": [],
- "generateResponseClasses": true,
- "responseClass": "SwaggerResponse",
- "namespace": "Tango.MachineService.Gateway",
- "requiredPropertiesMustBeDefined": true,
- "dateType": "System.DateTimeOffset",
- "jsonConverters": null,
- "anyType": "object",
- "dateTimeType": "System.DateTimeOffset",
- "timeType": "System.TimeSpan",
- "timeSpanType": "System.TimeSpan",
- "arrayType": "System.Collections.Generic.ICollection",
- "arrayInstanceType": "System.Collections.ObjectModel.Collection",
- "dictionaryType": "System.Collections.Generic.IDictionary",
- "dictionaryInstanceType": "System.Collections.Generic.Dictionary",
- "arrayBaseType": "System.Collections.ObjectModel.Collection",
- "dictionaryBaseType": "System.Collections.Generic.Dictionary",
- "classStyle": "Poco",
- "generateDefaultValues": true,
- "generateDataAnnotations": true,
- "excludedTypeNames": [],
- "excludedParameterNames": [],
- "handleReferences": false,
- "generateImmutableArrayProperties": false,
- "generateImmutableDictionaryProperties": false,
- "jsonSerializerSettingsTransformationMethod": null,
- "inlineNamedArrays": false,
- "inlineNamedDictionaries": false,
- "inlineNamedTuples": true,
- "inlineNamedAny": false,
- "generateDtoTypes": true,
- "generateOptionalPropertiesAsNullable": false,
- "templateDirectory": null,
- "typeNameGeneratorType": null,
- "propertyNameGeneratorType": null,
- "enumNameGeneratorType": null,
- "serviceHost": null,
- "serviceSchemes": null,
- "output": "$(output)"
- }
- }
-} \ No newline at end of file
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Properties/AssemblyInfo.cs
deleted file mode 100644
index 0df63df7a..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Tango.MachineService.Gateway")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Tango.MachineService.Gateway")]
-[assembly: AssemblyCopyright("Copyright © 2020")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("8883a0c7-a35b-4eea-97ea-34eb8101dd21")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Properties/PublishProfiles/machineservice-gateway - Web Deploy.pubxml b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Properties/PublishProfiles/machineservice-gateway - Web Deploy.pubxml
deleted file mode 100644
index 8af9f7fc8..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Properties/PublishProfiles/machineservice-gateway - Web Deploy.pubxml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-This file is used by the publish/package process of your Web project. You can customize the behavior of this process
-by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
--->
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <WebPublishMethod>MSDeploy</WebPublishMethod>
- <ResourceId>/subscriptions/10c8aa60-3b15-4e0d-b412-6aeef90e5e91/resourceGroups/Tango/providers/Microsoft.Web/sites/machineservice-gateway</ResourceId>
- <ResourceGroup>Tango</ResourceGroup>
- <PublishProvider>AzureWebSite</PublishProvider>
- <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
- <LastUsedPlatform>Any CPU</LastUsedPlatform>
- <SiteUrlToLaunchAfterPublish>http://machineservice-gateway.azurewebsites.net</SiteUrlToLaunchAfterPublish>
- <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
- <ExcludeApp_Data>False</ExcludeApp_Data>
- <MSDeployServiceURL>machineservice-gateway.scm.azurewebsites.net:443</MSDeployServiceURL>
- <DeployIisAppPath>machineservice-gateway</DeployIisAppPath>
- <RemoteSitePhysicalPath />
- <SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
- <InstallAspNetCoreSiteExtension>False</InstallAspNetCoreSiteExtension>
- <MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
- <EnableMSDeployBackup>True</EnableMSDeployBackup>
- <UserName>$machineservice-gateway</UserName>
- <_SavePWD>True</_SavePWD>
- <_DestinationType>AzureWebSite</_DestinationType>
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Tango.MachineService.Gateway.csproj b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Tango.MachineService.Gateway.csproj
deleted file mode 100644
index f749f7f57..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Tango.MachineService.Gateway.csproj
+++ /dev/null
@@ -1,350 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>
- </ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{0F5F28AD-81B9-43A0-9BA7-CFB74F37202C}</ProjectGuid>
- <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Tango.MachineService.Gateway</RootNamespace>
- <AssemblyName>Tango.MachineService.Gateway</AssemblyName>
- <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
- <MvcBuildViews>false</MvcBuildViews>
- <UseIISExpress>true</UseIISExpress>
- <Use64BitIISExpress />
- <IISExpressSSLPort />
- <IISExpressAnonymousAuthentication />
- <IISExpressWindowsAuthentication />
- <IISExpressUseClassicPipelineMode />
- <UseGlobalApplicationHostFile />
- <NuGetPackageImportStamp>
- </NuGetPackageImportStamp>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
- <HintPath>..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
- </Reference>
- <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
- <HintPath>..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
- </Reference>
- <Reference Include="JWT, Version=5.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\..\packages\JWT.5.0.0\lib\net46\JWT.dll</HintPath>
- <Private>True</Private>
- </Reference>
- <Reference Include="Microsoft.Azure.KeyVault, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.KeyVault.3.0.1\lib\net452\Microsoft.Azure.KeyVault.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.KeyVault.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.KeyVault.WebKey, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.KeyVault.WebKey.3.0.1\lib\net452\Microsoft.Azure.KeyVault.WebKey.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.AppService.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.AppService.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.AppService.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.BatchAI.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.BatchAI.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.BatchAI.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.Cdn.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.Cdn.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.Cdn.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.Compute.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.Compute.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.Compute.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.ContainerInstance.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.ContainerInstance.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.ContainerInstance.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.ContainerRegistry.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.ContainerRegistry.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.ContainerRegistry.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.ContainerService.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.ContainerService.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.ContainerService.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.CosmosDB.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.CosmosDB.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.CosmosDB.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.Dns.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.Dns.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.Dns.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.EventHub.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.EventHub.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.EventHub.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.Graph.RBAC.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.Graph.RBAC.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.Graph.RBAC.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.KeyVault.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.KeyVault.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.KeyVault.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.Locks.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.Locks.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.Locks.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.Monitor.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.Monitor.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.Monitor.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.Msi.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.Msi.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.Msi.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.Network.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.Network.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.Network.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.PrivateDns.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.PrivateDns.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.PrivateDns.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.Redis.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.Redis.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.Redis.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.ResourceManager.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.ResourceManager.Fluent.1.31.0\lib\net461\Microsoft.Azure.Management.ResourceManager.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.Search.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.Search.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.Search.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.ServiceBus.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.ServiceBus.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.ServiceBus.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.Sql.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.Sql.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.Sql.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.Storage.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.Storage.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.Storage.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Azure.Management.TrafficManager.Fluent, Version=1.0.0.64, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Azure.Management.TrafficManager.Fluent.1.31.0\lib\net452\Microsoft.Azure.Management.TrafficManager.Fluent.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.4.3.0\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.IdentityModel.Logging, Version=1.1.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.IdentityModel.Logging.1.1.2\lib\net451\Microsoft.IdentityModel.Logging.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.IdentityModel.Tokens, Version=5.1.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.IdentityModel.Tokens.5.1.2\lib\net451\Microsoft.IdentityModel.Tokens.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.3.19\lib\net461\Microsoft.Rest.ClientRuntime.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.18\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.4.0\lib\net461\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.WindowsAzure.Storage, Version=9.3.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\WindowsAzure.Storage.9.3.3\lib\net45\Microsoft.WindowsAzure.Storage.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.IdentityModel" />
- <Reference Include="System.Net" />
- <Reference Include="System.Runtime" />
- <Reference Include="System.Security" />
- <Reference Include="System.Web.Entity" />
- <Reference Include="System.Web.ApplicationServices" />
- <Reference Include="System.ComponentModel.DataAnnotations" />
- <Reference Include="System.Core" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Web" />
- <Reference Include="System.Web.Abstractions" />
- <Reference Include="System.Web.Routing" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Configuration" />
- <Reference Include="System.Runtime.Serialization" />
- <Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
- </Reference>
- <Reference Include="Newtonsoft.Json">
- <HintPath>..\..\packages\Newtonsoft.Json.11.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
- </Reference>
- <Reference Include="System.Net.Http">
- </Reference>
- <Reference Include="System.Net.Http.Formatting, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.4\lib\net45\System.Net.Http.Formatting.dll</HintPath>
- </Reference>
- <Reference Include="System.Net.Http.WebRequest">
- </Reference>
- <Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.4\lib\net45\System.Web.Helpers.dll</HintPath>
- </Reference>
- <Reference Include="System.Web.Http, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.AspNet.WebApi.Core.5.2.4\lib\net45\System.Web.Http.dll</HintPath>
- </Reference>
- <Reference Include="System.Web.Http.WebHost, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.4\lib\net45\System.Web.Http.WebHost.dll</HintPath>
- </Reference>
- <Reference Include="System.Web.Mvc, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\..\packages\Microsoft.AspNet.Mvc.5.2.4\lib\net45\System.Web.Mvc.dll</HintPath>
- </Reference>
- <Reference Include="System.Web.Optimization">
- <HintPath>..\..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
- </Reference>
- <Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\..\packages\Microsoft.AspNet.Razor.3.2.4\lib\net45\System.Web.Razor.dll</HintPath>
- </Reference>
- <Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.4\lib\net45\System.Web.WebPages.dll</HintPath>
- </Reference>
- <Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.4\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
- </Reference>
- <Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.4\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
- </Reference>
- <Reference Include="WebGrease">
- <Private>True</Private>
- <HintPath>..\..\packages\WebGrease.1.6.0\lib\WebGrease.dll</HintPath>
- </Reference>
- <Reference Include="Antlr3.Runtime">
- <Private>True</Private>
- <HintPath>..\..\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform">
- <HintPath>..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="App_Start\BundleConfig.cs" />
- <Compile Include="App_Start\FilterConfig.cs" />
- <Compile Include="App_Start\RouteConfig.cs" />
- <Compile Include="App_Start\WebApiConfig.cs" />
- <Compile Include="Controllers\AzureUtilsController.cs" />
- <Compile Include="Controllers\GatewayController.cs" />
- <Compile Include="Controllers\HomeController.cs" />
- <Compile Include="Controllers\ValuesController.cs" />
- <Compile Include="DB\Environment.cs" />
- <Compile Include="DB\GatewayDbContext.cs" />
- <Compile Include="DTO\EnvironmentConfiguration.cs" />
- <Compile Include="Filters\JwtTokenFilter.cs" />
- <Compile Include="Global.asax.cs">
- <DependentUpon>Global.asax</DependentUpon>
- </Compile>
- <Compile Include="GatewayConfig.cs" />
- <Compile Include="Messages\EnvironmentsRequest.cs" />
- <Compile Include="Messages\EnvironmentsResponse.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="TangoController.cs" />
- <Compile Include="WebToken.cs" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="Global.asax" />
- <Content Include="Web.config">
- <SubType>Designer</SubType>
- </Content>
- <Content Include="Web.Debug.config">
- <DependentUpon>Web.config</DependentUpon>
- </Content>
- <Content Include="Web.Release.config">
- <DependentUpon>Web.config</DependentUpon>
- </Content>
- <Content Include="Views\Web.config" />
- <Content Include="Views\_ViewStart.cshtml" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="App_Data\" />
- <Folder Include="Models\" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="Nswag\GatewayClient.nswag" />
- <None Include="packages.config">
- <SubType>Designer</SubType>
- </None>
- <None Include="Properties\PublishProfiles\machineservice-gateway - Web Deploy.pubxml" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\Azure\Tango.AzureUtils\Tango.AzureUtils.csproj">
- <Project>{4a6b97e5-5eba-4702-a016-6f4004f14b08}</Project>
- <Name>Tango.AzureUtils</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\Tango.Core\Tango.Core.csproj">
- <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
- <Name>Tango.Core</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\Tango.Logging\Tango.Logging.csproj">
- <Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project>
- <Name>Tango.Logging</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
- </ItemGroup>
- <PropertyGroup>
- <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
- <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
- </PropertyGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
- <Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
- <AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
- </Target>
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
- <WebProjectProperties>
- <UseIIS>True</UseIIS>
- <AutoAssignPort>True</AutoAssignPort>
- <DevelopmentServerPort>53838</DevelopmentServerPort>
- <DevelopmentServerVPath>/</DevelopmentServerVPath>
- <IISUrl>http://localhost:2222/</IISUrl>
- <NTLMAuthentication>False</NTLMAuthentication>
- <UseCustomServer>False</UseCustomServer>
- <CustomServerUrl>
- </CustomServerUrl>
- <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
- </WebProjectProperties>
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
- <PropertyGroup>
- <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
- </PropertyGroup>
- <Error Condition="!Exists('..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
- </Target>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target> -->
-</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/TangoController.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/TangoController.cs
deleted file mode 100644
index d44a14950..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/TangoController.cs
+++ /dev/null
@@ -1,125 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Net;
-using System.Net.Http;
-using System.Security.Authentication;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Web;
-using System.Web.Http;
-using System.Web.Http.Controllers;
-using Tango.Logging;
-using Tango.Web.Security;
-
-namespace Tango.Web.Controllers
-{
- public class TangoController : ApiController
- {
- protected LogManager LogManager { get; private set; }
-
- public TangoController()
- {
- LogManager = LogManager.Default;
- }
-
- public override async Task<HttpResponseMessage> ExecuteAsync(HttpControllerContext context, CancellationToken cancellationToken)
- {
- string controllerName = String.Empty;
- string actionName = String.Empty;
-
- try
- {
- var routeData = HttpContext.Current.Request.RequestContext.RouteData;
- actionName = routeData.Values["action"].ToString();
- controllerName = routeData.Values["controller"].ToString();
- }
- catch { }
-
- try
- {
- String request = String.Empty;
-
- try
- {
- request = context.Request.Content.ReadAsStringAsync().Result;
- }
- catch { }
-
- LogManager.Log($"Request Received on {controllerName + "/" + actionName}: \n{request}");
-
- OnRequestArrived(context.Request);
-
- var result = await base.ExecuteAsync(context, cancellationToken);
- return result;
- }
- catch (Exception ex)
- {
- LogManager.Log(ex, $"An error occurred while processing the request message on {controllerName + "/" + actionName}.");
-
- HttpStatusCode code = HttpStatusCode.InternalServerError;
-
- if (ex is ArgumentException || ex is InvalidDataException)
- {
- code = HttpStatusCode.BadRequest;
- }
- else if (ex is AuthenticationException)
- {
- code = HttpStatusCode.Unauthorized;
- }
-
- var httpException = new HttpResponseException(Request.CreateErrorResponse(code, ex.FlattenMessage(), ex));
-
-#if DEBUG
- throw httpException;
-#else
- //Remove Stack trace
- var expandedException = httpException.Response.Content as System.Net.Http.ObjectContent<System.Web.Http.HttpError>;
-
- if (expandedException != null)
- {
- var expandedExceptionValues = expandedException.Value as HttpError;
-
- if (expandedExceptionValues != null)
- {
- expandedExceptionValues["StackTrace"] = "StackTrace not provided.";
- }
- }
-#endif
-
-
- throw httpException;
- }
- }
-
- protected virtual void OnRequestArrived(HttpRequestMessage request)
- {
- //Do nothing.
- }
- }
-
- public class TangoController<T> : TangoController where T : class
- {
- public WebToken<T> RequestToken { get; set; }
-
- protected override void OnRequestArrived(HttpRequestMessage request)
- {
- base.OnRequestArrived(request);
-
- var authorizationHeader = request.Headers.Authorization;
-
- if (authorizationHeader != null)
- {
- try
- {
- RequestToken = WebToken<T>.FromToken(authorizationHeader.Parameter != null ? authorizationHeader.Parameter : authorizationHeader.ToString());
- }
- catch (Exception ex)
- {
- throw new HttpParseException("Could not parse the provided token embedded object.", ex);
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Views/Web.config b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Views/Web.config
deleted file mode 100644
index ecea3014b..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Views/Web.config
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0"?>
-
-<configuration>
- <configSections>
- <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
- <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
- <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
- </sectionGroup>
- </configSections>
-
- <system.web.webPages.razor>
- <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
- <pages pageBaseType="System.Web.Mvc.WebViewPage">
- <namespaces>
- <add namespace="System.Web.Mvc" />
- <add namespace="System.Web.Mvc.Ajax" />
- <add namespace="System.Web.Mvc.Html" />
- <add namespace="System.Web.Optimization"/>
- <add namespace="System.Web.Routing" />
- <add namespace="Tango.MachineService.Gateway" />
- </namespaces>
- </pages>
- </system.web.webPages.razor>
-
- <appSettings>
- <add key="webpages:Enabled" value="false" />
- </appSettings>
-
- <system.webServer>
- <handlers>
- <remove name="BlockViewHandler"/>
- <add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
- </handlers>
- </system.webServer>
-
- <system.web>
- <compilation>
- <assemblies>
- <add assembly="System.Web.Mvc, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
- </assemblies>
- </compilation>
- </system.web>
-</configuration>
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Views/_ViewStart.cshtml b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Views/_ViewStart.cshtml
deleted file mode 100644
index 2de62418c..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Views/_ViewStart.cshtml
+++ /dev/null
@@ -1,3 +0,0 @@
-@{
- Layout = "~/Views/Shared/_Layout.cshtml";
-}
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Web.Debug.config b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Web.Debug.config
deleted file mode 100644
index d7712aaf1..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Web.Debug.config
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- For more information on using Web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=301874 -->
-
-<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
- <!--
- In the example below, the "SetAttributes" transform will change the value of
- "connectionString" to use "ReleaseSQLServer" only when the "Match" locator
- finds an attribute "name" that has a value of "MyDB".
-
- <connectionStrings>
- <add name="MyDB"
- connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
- xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
- </connectionStrings>
- -->
- <system.web>
- <!--
- In the example below, the "Replace" transform will replace the entire
- <customErrors> section of your Web.config file.
- Note that because there is only one customErrors section under the
- <system.web> node, there is no need to use the "xdt:Locator" attribute.
-
- <customErrors defaultRedirect="GenericError.htm"
- mode="RemoteOnly" xdt:Transform="Replace">
- <error statusCode="500" redirect="InternalError.htm"/>
- </customErrors>
- -->
- </system.web>
-</configuration>
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Web.Release.config b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Web.Release.config
deleted file mode 100644
index 28a4d5fcc..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Web.Release.config
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- For more information on using Web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=301874 -->
-
-<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
- <!--
- In the example below, the "SetAttributes" transform will change the value of
- "connectionString" to use "ReleaseSQLServer" only when the "Match" locator
- finds an attribute "name" that has a value of "MyDB".
-
- <connectionStrings>
- <add name="MyDB"
- connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
- xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
- </connectionStrings>
- -->
- <system.web>
- <compilation xdt:Transform="RemoveAttributes(debug)" />
- <!--
- In the example below, the "Replace" transform will replace the entire
- <customErrors> section of your Web.config file.
- Note that because there is only one customErrors section under the
- <system.web> node, there is no need to use the "xdt:Locator" attribute.
-
- <customErrors defaultRedirect="GenericError.htm"
- mode="RemoteOnly" xdt:Transform="Replace">
- <error statusCode="500" redirect="InternalError.htm"/>
- </customErrors>
- -->
- </system.web>
-</configuration>
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Web.config b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Web.config
deleted file mode 100644
index 6dd29d57d..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/Web.config
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- For more information on how to configure your ASP.NET application, please visit
- https://go.microsoft.com/fwlink/?LinkId=301879
- -->
-<configuration>
- <configSections>
- <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
- <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
- </configSections>
- <appSettings>
- <add key="webpages:Version" value="3.0.0.0" />
- <add key="webpages:Enabled" value="false" />
- <add key="ClientValidationEnabled" value="true" />
- <add key="UnobtrusiveJavaScriptEnabled" value="true" />
- <add key="DB_ADDRESS" value="twine.database.windows.net" />
- <add key="DB_USER_NAME" value="Roy" />
- <add key="DB_PASSWORD" value="Aa123456" />
- <add key="DB_CATALOG" value="Gateway" />
- <add key="TENANT_ID" value="2ebd63a5-bc2f-41dc-9066-4409ed5e5dd4" />
- <add key="CLIENT_ID" value="be33437c-5052-449f-ab9d-a88d008eae24" />
- <add key="CLIENT_SECRET" value="bf67fb6f-4d06-4893-988c-6b347aff23d6" />
- <add key="SUBSCRIPTION_ID" value="10c8aa60-3b15-4e0d-b412-6aeef90e5e91" />
- <add key="AZURE_UTILS_GROUP" value="Azure Utils" />
- <add key="STORAGE_ACCOUNT" value="DefaultEndpointsProtocol=https;AccountName=tangostorage;AccountKey=S4z/D+Yg6mwMis+bs/VpcDLA9yE1iZaYq23shQlRIi2KmM9E7JY8zdZjeAPOPdG3gONHoNDEpsgH6D4cqQ/bsA==;EndpointSuffix=core.windows.net" />
- <add key="TANGO_VERSIONS_CONTAINER" value="tango-versions-dev" />
- <add key="MACHINE_STUDIO_VERSIONS_CONTAINER" value="machine-studio-versions-dev" />
- <add key="JWT_TOKEN_SECRET" value="GQDstcKsx0NHjLOuXOYg5MbeJ1yT0u1iwDVTwine" />
- <add key="CDN_ENDPOINT" value="https://tango.azureedge.net" />
- </appSettings>
- <system.web>
- <compilation debug="true" targetFramework="4.6.1" />
- <httpRuntime targetFramework="4.6.1" />
- </system.web>
- <system.webServer>
- <handlers>
- <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
- <remove name="OPTIONSVerbHandler" />
- <remove name="TRACEVerbHandler" />
- <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
- </handlers>
- </system.webServer>
- <runtime>
- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
- <dependentAssembly>
- <assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" />
- <bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
- <bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
- <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
- <bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
- <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
- <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
- <bindingRedirect oldVersion="1.0.0.0-5.2.4.0" newVersion="5.2.4.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
- </dependentAssembly>
- </assemblyBinding>
- </runtime>
- <system.codedom>
- <compilers>
- <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
- <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
- </compilers>
- </system.codedom>
- <entityFramework>
- <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
- <providers>
- <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
- </providers>
- </entityFramework>
- <connectionStrings>
- <add name="GatewayDbContext" connectionString="metadata=res://*/DB.GatewayDatabaseModel.csdl|res://*/DB.GatewayDatabaseModel.ssdl|res://*/DB.GatewayDatabaseModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=localhost\SQLEXPRESS;initial catalog=Gateway;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
- </connectionStrings>
-</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/WebToken.cs b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/WebToken.cs
deleted file mode 100644
index 7aa4860ab..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/WebToken.cs
+++ /dev/null
@@ -1,192 +0,0 @@
-using JWT;
-using JWT.Algorithms;
-using JWT.Builder;
-using JWT.Serializers;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Security.Claims;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Tango.Web.Security
-{
- public class WebToken
- {
- public DateTime Issued { get; protected set; }
- public DateTime? Expiration { get; protected set; }
- public String AccessToken { get; protected set; }
- public String RefreshToken { get; protected set; }
-
- public WebToken()
- {
-
- }
-
- public static WebToken CreateNew(String secret, DateTime? expiration = null)
- {
- DateTime issued = DateTime.UtcNow;
-
- var builder = new JwtBuilder()
- .WithAlgorithm(new HMACSHA256Algorithm())
- .WithSecret(secret)
- .IssuedAt(issued);
-
- if (expiration != null)
- {
- builder = builder.ExpirationTime(expiration.Value);
- }
-
- String refreshToken = Guid.NewGuid().ToString();
-
- builder = builder.AddClaim("object", null);
- builder = builder.AddClaim("refresh-token", refreshToken);
-
- return new WebToken()
- {
- AccessToken = builder.Build(),
- RefreshToken = refreshToken,
- Expiration = expiration,
- Issued = issued,
- };
- }
-
- public static void Validate(String secret, String token)
- {
- var json = new JwtBuilder()
- .WithSecret(secret)
- .MustVerifySignature()
- .Decode(token);
- }
-
- public void Validate(String secret)
- {
- var json = new JwtBuilder()
- .WithSecret(secret)
- .MustVerifySignature()
- .Decode(AccessToken);
- }
-
- public WebToken Renew(String secret)
- {
- var newToken = CreateNew(secret, DateTime.UtcNow.Add(Expiration.Value - Issued));
- newToken.RefreshToken = RefreshToken;
- return newToken;
- }
-
- public static WebToken FromToken(String token)
- {
- WebToken webToken = new WebToken();
-
- var payload = new JwtBuilder()
- .WithValidator(null)
- .Decode<IDictionary<string, object>>(token);
-
- webToken.AccessToken = token;
-
- if (payload.ContainsKey("exp"))
- {
- long exp = long.Parse(payload["exp"].ToString());
- webToken.Expiration = ConvertEpochToDateTime(exp);
- }
-
- if (payload.ContainsKey("iat"))
- {
- long iat = long.Parse(payload["iat"].ToString());
- webToken.Issued = ConvertEpochToDateTime(iat);
- }
-
- if (payload.ContainsKey("refresh-token"))
- {
- webToken.RefreshToken = payload["refresh-token"].ToString();
- }
-
- return webToken;
- }
-
- protected static DateTime ConvertEpochToDateTime(long seconds)
- {
- var epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
- return epoch.AddSeconds(seconds);
- }
- }
-
- public class WebToken<T> : WebToken where T : class
- {
- public T Object { get; protected set; }
-
- private WebToken()
- {
-
- }
-
- public static WebToken<T> CreateNew(String secret, T obj = null, DateTime? expiration = null)
- {
- DateTime issued = DateTime.UtcNow;
-
- var builder = new JwtBuilder()
- .WithAlgorithm(new HMACSHA256Algorithm())
- .WithSecret(secret)
- .IssuedAt(issued);
-
- if (expiration != null)
- {
- builder = builder.ExpirationTime(expiration.Value);
- }
-
- String refreshToken = Guid.NewGuid().ToString();
-
- builder = builder.AddClaim("object", obj);
- builder = builder.AddClaim("refresh-token", refreshToken);
-
- return new WebToken<T>()
- {
- AccessToken = builder.Build(),
- RefreshToken = refreshToken,
- Expiration = expiration,
- Issued = issued,
- Object = obj,
- };
- }
-
- public static new WebToken<T> FromToken(String token)
- {
- WebToken<T> webToken = new WebToken<T>();
-
- var payload = new JwtBuilder()
- .WithValidator(null)
- .Decode<IDictionary<string, object>>(token);
-
- webToken.AccessToken = token;
-
- if (payload.ContainsKey("exp"))
- {
- long exp = long.Parse(payload["exp"].ToString());
- webToken.Expiration = ConvertEpochToDateTime(exp);
- }
-
- if (payload.ContainsKey("iat"))
- {
- long iat = long.Parse(payload["iat"].ToString());
- webToken.Issued = ConvertEpochToDateTime(iat);
- }
-
- if (payload.ContainsKey("refresh-token"))
- {
- webToken.RefreshToken = payload["refresh-token"].ToString();
- }
-
- webToken.Object = JsonConvert.DeserializeObject<T>(payload["object"].ToString());
-
- return webToken;
- }
-
- public new WebToken<T> Renew(String secret)
- {
- var newToken = WebToken<T>.CreateNew(secret, Object, DateTime.UtcNow.Add(Expiration.Value - Issued));
- newToken.RefreshToken = RefreshToken;
- return newToken;
- }
- }
-}
diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/packages.config b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/packages.config
deleted file mode 100644
index 72f15dbf6..000000000
--- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/packages.config
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="Antlr" version="3.5.0.2" targetFramework="net461" />
- <package id="bootstrap" version="3.3.7" targetFramework="net461" />
- <package id="EntityFramework" version="6.2.0" targetFramework="net461" />
- <package id="jQuery" version="3.3.1" targetFramework="net461" />
- <package id="JWT" version="5.0.0" targetFramework="net461" />
- <package id="Microsoft.AspNet.Mvc" version="5.2.4" targetFramework="net461" />
- <package id="Microsoft.AspNet.Razor" version="3.2.4" targetFramework="net461" />
- <package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net461" />
- <package id="Microsoft.AspNet.WebApi" version="5.2.4" targetFramework="net461" />
- <package id="Microsoft.AspNet.WebApi.Client" version="5.2.4" targetFramework="net461" />
- <package id="Microsoft.AspNet.WebApi.Core" version="5.2.4" targetFramework="net461" />
- <package id="Microsoft.AspNet.WebApi.HelpPage" version="5.2.4" targetFramework="net461" />
- <package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.4" targetFramework="net461" />
- <package id="Microsoft.AspNet.WebPages" version="3.2.4" targetFramework="net461" />
- <package id="Microsoft.Azure.KeyVault" version="3.0.1" targetFramework="net461" />
- <package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net461" />
- <package id="Microsoft.Azure.KeyVault.WebKey" version="3.0.1" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.AppService.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.BatchAI.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.Cdn.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.Compute.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.ContainerInstance.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.ContainerRegistry.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.ContainerService.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.CosmosDB.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.Dns.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.EventHub.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.Graph.RBAC.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.KeyVault.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.Locks.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.Monitor.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.Msi.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.Network.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.PrivateDns.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.Redis.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.ResourceManager.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.Search.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.ServiceBus.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.Sql.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.Storage.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.Azure.Management.TrafficManager.Fluent" version="1.31.0" targetFramework="net461" />
- <package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.0" targetFramework="net461" />
- <package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="4.3.0" targetFramework="net461" />
- <package id="Microsoft.IdentityModel.Logging" version="1.1.2" targetFramework="net461" />
- <package id="Microsoft.IdentityModel.Tokens" version="5.1.2" targetFramework="net461" />
- <package id="Microsoft.Rest.ClientRuntime" version="2.3.19" targetFramework="net461" />
- <package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.18" targetFramework="net461" />
- <package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.4.0" targetFramework="net461" />
- <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net461" />
- <package id="Modernizr" version="2.8.3" targetFramework="net461" />
- <package id="Newtonsoft.Json" version="11.0.1" targetFramework="net461" />
- <package id="WebGrease" version="1.6.0" targetFramework="net461" />
- <package id="WindowsAzure.Storage" version="9.3.3" targetFramework="net461" />
-</packages> \ No newline at end of file