Skip to content

Commit

Permalink
Merge branch 'master' into validation
Browse files Browse the repository at this point in the history
  • Loading branch information
lucabruno91 committed May 10, 2024
2 parents 802e4c4 + f5f3c33 commit 3f34ca0
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ src/.vs/config/applicationhost.config

#Ermes ignore
src/Ermes.Web/appsettings.*
!src/Ermes.Web/appsettings.template.json
src/Ermes.Web/app.config
src/Ermes.Web/firebasekey*
src/Ermes.Web/wwwroot/Temp/Downloads/*
Expand Down
2 changes: 1 addition & 1 deletion src/Ermes.Core/AppVersionHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class AppVersionHelper
/// All project's assembly versions are changed when this value is changed.
/// It's also shown in the web page.
/// </summary>
public const string Version = "4.19.2";
public const string Version = "4.19.3";

/// <summary>
/// Gets release (last build) date of the application.
Expand Down
1 change: 1 addition & 0 deletions src/Ermes.Core/ErmesSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ public class ErmesSettings
public string CorsOrigins { get; set; }
public bool HangfireEnabled { get; set; }
public string ErmesProject { get; set; } = "FASTER";
public string WebApp { get; set; }
}
}
10 changes: 7 additions & 3 deletions src/Ermes.Web/Controllers/AuthController.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Ermes.Interfaces;
using Ermes.Configuration;
using Ermes.Interfaces;
using FusionAuthNetCore;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
Expand All @@ -11,10 +12,12 @@ namespace Ermes.Web.Controllers
public class AuthController : ErmesControllerBase, IBackofficeApi
{
private readonly IOptions<FusionAuthSettings> _fusionAuthSettings;
private readonly IOptions<ErmesSettings> _ermesSettings;

public AuthController(IOptions<FusionAuthSettings> fusionAuthSettings)
public AuthController(IOptions<FusionAuthSettings> fusionAuthSettings, IOptions<ErmesSettings> ermesSettings)
{
_fusionAuthSettings = fusionAuthSettings;
_ermesSettings = ermesSettings;
}

/// <summary>
Expand All @@ -36,7 +39,8 @@ public async Task<IActionResult> TokenRetrieve(string code)
if (isThereOriginHeader)
redirectUri = $"{source[0]}/login-callback";
else
return BadRequest("Invalid Origin Header");
redirectUri = $"{_ermesSettings.Value.WebApp}/login-callback";
//return BadRequest("Invalid Origin Header");

var tokenResponse = await client.ExchangeOAuthCodeForAccessTokenAsync(code, _fusionAuthSettings.Value.ClientId, _fusionAuthSettings.Value.ClientSecret, redirectUri);
if (tokenResponse.WasSuccessful())
Expand Down
4 changes: 4 additions & 0 deletions src/Ermes.Web/Release-Notes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Ver.
--------------------------------


Ver. 4.19.3 - 2024-04-03
--------------------------------
- Feature - Added map request count limit for trial period (#180)

Ver. 4.19.2 - 2024-03-22
Expand Down
89 changes: 89 additions & 0 deletions src/Ermes.Web/appsettings.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"ConnectionStrings": {
"Default": ""
},
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "",
"System": "",
"Microsoft": ""
}
},
"App": {
"CorsOrigins": "",
"HangfireEnabled": false,
"ErmesProject": "",
"Environment": "",
"WebApp": ""
},
"Authentication": {
"JwtBearer": {
"IsEnabled": "",
"Issuer": "",
"Audience": ""
}
},
"FusionAuth": {
"ApiKey": "",
"Url": "",
"Tenant": "",
"TenantId": "",
"ApplicationId": "",
"ClientId": "",
"ClientSecret": ""
},
"Azure": {
"BlobStorageConnectionString": "",
"BlobStorageBasePath": ""
},
"Chatbot": {
"ApiKey": "",
"BasePath": ""
},
"Social": {
"ApiKey": "",
"ApiSecret": "",
"BasePath": ""
},
"Bus": {
"IsEnabled": false,
"Type": "",
"Hostname": "",
"Port": 0,
"VirtualHost": "",
"Exchange": "",
"Username": "",
"Password": "",
"Queue": "",
"MustDeclareBindings": false
},
"AzureCognitiveServices": {
"SubscriptionKey": "",
"Endpoint": ""
},
"Csi": {
"BaseUrl": "",
"Username": "",
"Password": "",
"BaseUrl_Presidi": "",
"Username_Presidi": "",
"Password_Presidi": ""
},
"Externals": {
"ApiKey": ""
},
"Importer": {
"BaseUrl": "",
"HeaderName": "",
"ApiKey": ""
},
"SensorService": {
"ApiKey": "",
"BasePath": ""
},
"Dss": {
"MustCreateAlert": false,
"MustConvertAlertInCommunication": false
}
}

0 comments on commit 3f34ca0

Please sign in to comment.