Update to latest packages and show examples
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using GerstITS.Authentication.ApiKey;
|
||||
using GerstITS.System.Configurations;
|
||||
|
||||
namespace GerstITS.Examples.Api.Configurations;
|
||||
|
||||
internal class ApiKeyConfiguration : IApiKeyConfiguration
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public ApiKeyConfiguration(string parentPrefix,
|
||||
Microsoft.Extensions.Configuration.IConfiguration configuration)
|
||||
{
|
||||
var prefix = $"{parentPrefix}:{this.ToConfigurationPrefix()}";
|
||||
|
||||
Header = configuration.GetValue<string>($"{prefix}:{nameof(Header)}");
|
||||
Key = configuration.GetValue<string>($"{prefix}:{nameof(Key)}");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IApiKeyConfiguration
|
||||
|
||||
public string Header { get; }
|
||||
public string Key { get; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user