Fixed secret retrieval for connection testing while adding an ERI data source (#325)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2025-03-11 13:57:47 +01:00
1 parent 0125f48f61
commit 2429788ccc
10 files changed
+53 -40

No files matched your search

@@ -1,10 +1,14 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using AIStudio.Settings;
namespace AIStudio.Tools.ERIClient;
public abstract class ERIClientBase(string baseAddress) : IDisposable
public abstract class ERIClientBase(IERIDataSource dataSource) : IDisposable
{
protected readonly IERIDataSource dataSource = dataSource;
protected static readonly JsonSerializerOptions JSON_OPTIONS = new()
{
WriteIndented = true,
@@ -21,7 +25,7 @@ public abstract class ERIClientBase(string baseAddress) : IDisposable
protected readonly HttpClient httpClient = new()
{
BaseAddress = new Uri(baseAddress),
BaseAddress = new Uri($"{dataSource.Hostname}:{dataSource.Port}"),
};
protected string securityToken = string.Empty;