Skip to content

Commit

Permalink
dfgdgf (#886)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaybeeelsdon authored Dec 4, 2024
1 parent 0532b8d commit b34f1a2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/BL/Services/KeycloakTokenHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Serilog;
using System.IdentityModel.Tokens.Jwt;
using System.Net;
using System.Runtime;

namespace BL.Services
{
Expand Down Expand Up @@ -44,10 +45,10 @@ public async Task<string> GetTokenForUser(string username, string password, stri
{
// Create an HttpClientHandler with proxy settings
handler.Proxy = new WebProxy(_proxyUrl); // Replace with your proxy server URL

}


Log.Information("{Function}} 2 requireHttps {RequireHttps}", "GetTokenForUser", _requireHttps);
// Create an HttpClient with the handler
return await KeycloakCommon.GetTokenForUserGuts(username, password, requiredRole, handler, keycloakBaseUrl, clientId, clientSecret, _requireHttps);

Expand Down
3 changes: 2 additions & 1 deletion src/DARE-API/Services/KeyclockTokenAPIHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ public async Task<string> GetTokenForUser(string username, string password, stri
string clientId = _settings.ClientId;
string clientSecret = _settings.ClientSecret;
var proxyhandler = _settings.getProxyHandler;
Log.Information($"GetTokenForUser uesing proxyhandler _settings.Authority > {_settings.Authority}");

var requireHttps = !_settings.IgnoreHttps;
Log.Information("{Function}} 1 using proxyhandler _settings.Authority > {Authority}, requireHttps {RequireHttps}", "GetTokenForUser", _settings.Authority, requireHttps);
return await KeycloakCommon.GetTokenForUserGuts(username, password, requiredRole, proxyhandler, keycloakBaseUrl, clientId, clientSecret, requireHttps);
}

Expand Down
1 change: 1 addition & 0 deletions src/TRE-API/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
var submissionKeyCloakSettings = new SubmissionKeyCloakSettings();
configuration.Bind(nameof(submissionKeyCloakSettings), submissionKeyCloakSettings);
submissionKeyCloakSettings.IgnoreHttps = demomode;
Log.Information("{Function} DemoMode {DemoMode}, DemoModeS {DemoS}", "Main", demomode, configuration["DemoMode"]);
builder.Services.AddSingleton(submissionKeyCloakSettings);

var HasuraSettings = new HasuraSettings();
Expand Down

0 comments on commit b34f1a2

Please sign in to comment.