feat(AuthApiParams): Erstellen um Auth.API zu konfigurieren
This commit is contained in:
parent
2ddb26c69f
commit
65cb699989
34
src/DigitalData.Auth.API/Config/AuthApiParams.cs
Normal file
34
src/DigitalData.Auth.API/Config/AuthApiParams.cs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
using DigitalData.Auth.API.Config;
|
||||||
|
|
||||||
|
namespace DigitalData.Core.Tests.API.Config
|
||||||
|
{
|
||||||
|
public class AuthApiParams
|
||||||
|
{
|
||||||
|
private IEnumerable<Consumer> _consumers = new List<Consumer>();
|
||||||
|
|
||||||
|
public IEnumerable<Consumer> Consumers
|
||||||
|
{
|
||||||
|
get => _consumers;
|
||||||
|
init
|
||||||
|
{
|
||||||
|
_consumers = value;
|
||||||
|
for (int i = 0; i < _consumers.Count(); i++)
|
||||||
|
_consumers.ElementAt(i).Parent = this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Consumer DefaultConsumer => Consumers.First();
|
||||||
|
|
||||||
|
public CookieOptionsProvider DefaultCookieOptions { get; init; } = new()
|
||||||
|
{
|
||||||
|
HttpOnly = true,
|
||||||
|
SameSite = SameSiteMode.Strict
|
||||||
|
};
|
||||||
|
|
||||||
|
public string CookieName { get; init; } = "AuthToken";
|
||||||
|
|
||||||
|
public required string Issuer { get; init; }
|
||||||
|
|
||||||
|
public bool RequireHttpsMetadata { get; init; } = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user