gehgassi_backend/gehGassi.Web/Auth/ConfigureCookieAuthenticationOptions.cs

21 lines
584 B
C#

using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.Extensions.Options;
namespace gehGassi.Web.Auth
{
public class ConfigureCookieAuthenticationOptions : IPostConfigureOptions<CookieAuthenticationOptions>
{
private readonly ITicketStore _ticketStore;
public ConfigureCookieAuthenticationOptions(ITicketStore ticketStore)
{
_ticketStore = ticketStore;
}
public void PostConfigure(string name, CookieAuthenticationOptions options)
{
options.SessionStore = _ticketStore;
}
}
}