refactor(Verbraucher): Als Unterklasse zur AuthApiParams-Klasse verschoben, um die Komplexität zu reduzieren
This commit is contained in:
parent
ddc55e0fd9
commit
110b102926
@ -28,5 +28,20 @@
|
|||||||
public required string Issuer { get; init; }
|
public required string Issuer { get; init; }
|
||||||
|
|
||||||
public bool RequireHttpsMetadata { get; init; } = true;
|
public bool RequireHttpsMetadata { get; init; } = true;
|
||||||
|
|
||||||
|
public class Consumer
|
||||||
|
{
|
||||||
|
public required string Route { get; init; }
|
||||||
|
|
||||||
|
public required string Audience { get; init; }
|
||||||
|
|
||||||
|
private CookieOptionsProvider? _cookieOptions;
|
||||||
|
|
||||||
|
#pragma warning disable CS8603 // Possible null reference return.
|
||||||
|
public CookieOptionsProvider CookieOptions { get => _cookieOptions ?? Parent?.DefaultCookieOptions; init => _cookieOptions = value; }
|
||||||
|
#pragma warning restore CS8603 // Possible null reference return.
|
||||||
|
|
||||||
|
internal AuthApiParams? Parent { private get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,4 +1,6 @@
|
|||||||
namespace DigitalData.Auth.API.Config
|
using static DigitalData.Auth.API.Config.AuthApiParams;
|
||||||
|
|
||||||
|
namespace DigitalData.Auth.API.Config
|
||||||
{
|
{
|
||||||
public static class ConfigExtensions
|
public static class ConfigExtensions
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,17 +0,0 @@
|
|||||||
namespace DigitalData.Auth.API.Config
|
|
||||||
{
|
|
||||||
public class Consumer
|
|
||||||
{
|
|
||||||
public required string Route { get; init; }
|
|
||||||
|
|
||||||
public required string Audience { get; init; }
|
|
||||||
|
|
||||||
private CookieOptionsProvider? _cookieOptions;
|
|
||||||
|
|
||||||
public CookieOptionsProvider CookieOptions { get => _cookieOptions ?? Parent?.DefaultCookieOptions; init => _cookieOptions = value; }
|
|
||||||
|
|
||||||
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
|
||||||
public AuthApiParams Parent { private get; set; }
|
|
||||||
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user