From d17cd66d675ec9de79c8a12b57d75079dba62eee Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 12 Feb 2020 18:26:56 +0200 Subject: Gateway --- .../App_Start/WebApiConfig.cs | 7 +- .../ApplicationInsights.config | 63 +++-- .../Controllers/AzureUtilsController.cs | 62 +++++ .../Filters/JwtTokenFilter.cs | 61 +++++ .../MachineServiceGatewayConfig.cs | 19 ++ .../Messages/LoginRequest.cs | 14 + .../Messages/LoginResponse.cs | 13 + .../Tango.MachineService.Gateway.csproj | 298 ++++++++++++++++----- .../Web/Tango.MachineService.Gateway/Web.config | 179 +++++++++++-- .../Tango.MachineService.Gateway/packages.config | 80 ++++-- 10 files changed, 674 insertions(+), 122 deletions(-) create mode 100644 Software/Visual_Studio/Web/Tango.MachineService.Gateway/Controllers/AzureUtilsController.cs create mode 100644 Software/Visual_Studio/Web/Tango.MachineService.Gateway/Filters/JwtTokenFilter.cs create mode 100644 Software/Visual_Studio/Web/Tango.MachineService.Gateway/MachineServiceGatewayConfig.cs create mode 100644 Software/Visual_Studio/Web/Tango.MachineService.Gateway/Messages/LoginRequest.cs create mode 100644 Software/Visual_Studio/Web/Tango.MachineService.Gateway/Messages/LoginResponse.cs (limited to 'Software/Visual_Studio/Web') 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 index ca49db782..d3bc653da 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/App_Start/WebApiConfig.cs +++ b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/App_Start/WebApiConfig.cs @@ -15,10 +15,9 @@ namespace Tango.MachineService.Gateway config.MapHttpAttributeRoutes(); config.Routes.MapHttpRoute( - name: "DefaultApi", - routeTemplate: "api/{controller}/{id}", - defaults: new { id = RouteParameter.Optional } - ); + name: "API Default", + routeTemplate: "api/{controller}/{action}/{id}", + defaults: new { id = RouteParameter.Optional }); } } } diff --git a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/ApplicationInsights.config b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/ApplicationInsights.config index 3fced9161..080c0c31e 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService.Gateway/ApplicationInsights.config +++ b/Software/Visual_Studio/Web/Tango.MachineService.Gateway/ApplicationInsights.config @@ -3,7 +3,6 @@ - @@ -12,6 +11,7 @@ search|spider|crawl|Bot|Monitor|AlwaysOn + @@ -31,8 +31,6 @@ core.chinacloudapi.cn core.cloudapi.de core.usgovcloudapi.net - localhost - 127.0.0.1 Microsoft.Azure.EventHubs @@ -59,6 +57,36 @@ --> + + + + @@ -85,19 +113,24 @@ - - - - - 5 - Event - - - 5 - Event + + + + + + + + 5 + Event + + + 5 + Event + + + - - +