From 30f93f2439e29de82c3e376f4f73468c004f69ee Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Thu, 21 Nov 2024 11:46:15 +0100 Subject: [PATCH] feat(GTXMessagingService): initialisiert mit Konfigurationsoption --- .../Configurations/GTXMessagingConfig.cs | 7 +++++++ .../Services/GTXMessagingService.cs | 15 +++++++++++++++ EnvelopeGenerator.Web/appsettings.json | 3 +++ 3 files changed, 25 insertions(+) create mode 100644 EnvelopeGenerator.Application/Configurations/GTXMessagingConfig.cs create mode 100644 EnvelopeGenerator.Application/Services/GTXMessagingService.cs diff --git a/EnvelopeGenerator.Application/Configurations/GTXMessagingConfig.cs b/EnvelopeGenerator.Application/Configurations/GTXMessagingConfig.cs new file mode 100644 index 00000000..45f9934b --- /dev/null +++ b/EnvelopeGenerator.Application/Configurations/GTXMessagingConfig.cs @@ -0,0 +1,7 @@ +namespace EnvelopeGenerator.Application.Configurations +{ + public class GTXMessagingConfig + { + public required string AuthKey { get; init; } + } +} \ No newline at end of file diff --git a/EnvelopeGenerator.Application/Services/GTXMessagingService.cs b/EnvelopeGenerator.Application/Services/GTXMessagingService.cs new file mode 100644 index 00000000..ee2b1db5 --- /dev/null +++ b/EnvelopeGenerator.Application/Services/GTXMessagingService.cs @@ -0,0 +1,15 @@ +using EnvelopeGenerator.Application.Configurations; +using Microsoft.Extensions.Options; + +namespace EnvelopeGenerator.Application.Services +{ + public class GTXMessagingService + { + private readonly string _authKey; + + public GTXMessagingService(IOptions options) + { + _authKey = options.Value.AuthKey; + } + } +} \ No newline at end of file diff --git a/EnvelopeGenerator.Web/appsettings.json b/EnvelopeGenerator.Web/appsettings.json index 7f37fbf3..6b2aaaf8 100644 --- a/EnvelopeGenerator.Web/appsettings.json +++ b/EnvelopeGenerator.Web/appsettings.json @@ -125,5 +125,8 @@ "[SIGNATURE_TYPE]": "signieren", "[REASON]": "" } + }, + "GTXMessagingConfig": { + "AuthKey": "ep$?A!Gs" } } \ No newline at end of file