mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-29 11:54:27 +01:00
27 lines
831 B
C#
27 lines
831 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BTCPayServer.Configuration.External
|
|
{
|
|
public class ExternalRTL : ExternalService, IAccessKeyService
|
|
{
|
|
public SparkConnectionString ConnectionString { get; }
|
|
|
|
public ExternalRTL(SparkConnectionString connectionString)
|
|
{
|
|
if (connectionString == null)
|
|
throw new ArgumentNullException(nameof(connectionString));
|
|
ConnectionString = connectionString;
|
|
}
|
|
|
|
public async Task<string> ExtractAccessKey()
|
|
{
|
|
if (ConnectionString?.CookeFile == null)
|
|
throw new FormatException("Invalid connection string");
|
|
return await System.IO.File.ReadAllTextAsync(ConnectionString.CookeFile);
|
|
}
|
|
}
|
|
}
|