applicationId uz neni povinne

This commit is contained in:
JiriUhlir
2026-06-15 08:42:56 +02:00
parent b01c09006a
commit cadfdaef1b
7 changed files with 127 additions and 10 deletions
+21
View File
@@ -0,0 +1,21 @@
using IdokladSdk;
using IdokladSdk.Authentication;
using IdokladSdk.Builders;
namespace Idoklad.Client;
/// <summary>
/// <see cref="DokladApiBuilder"/> variant that uses a caller-supplied <see cref="IAuthentication"/>
/// (here <see cref="ClientSecretAuthentication"/>) instead of the SDK's applicationId-mandatory
/// client credentials. The rest of the builder pipeline (HttpClient, options, urls, Build) is reused.
/// </summary>
public sealed class ClientSecretDokladApiBuilder : DokladApiBuilder
{
private readonly IAuthentication _authentication;
public ClientSecretDokladApiBuilder(string appName, string appVersion, IAuthentication authentication)
: base(appName, appVersion)
=> _authentication = authentication;
protected override IAuthentication GetAuthentication() => _authentication;
}