applicationId uz neni povinne
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user