Class ConfigureCookieWithTicketStoreAuthenticationOptions
Configures the authentication cookie so the session is kept in an ITicketStore. It is registered (with TryAddSingleton) by
AddOidcAuthentication and AddHybridAuthentication when AuthenticationCacheTicketStoreOption is set;
another IPostConfigureOptions<TOptions> of the cookie options registered before replaces it.
public class ConfigureCookieWithTicketStoreAuthenticationOptions : IPostConfigureOptions<CookieAuthenticationOptions>
- Inheritance
-
ConfigureCookieWithTicketStoreAuthenticationOptions
- Implements
- Inherited Members
Constructors
ConfigureCookieWithTicketStoreAuthenticationOptions(ITicketStore, IOptionsMonitor<OidcAuthenticationOptions>)
Initializes a new instance of the ConfigureCookieWithTicketStoreAuthenticationOptions class.
public ConfigureCookieWithTicketStoreAuthenticationOptions(ITicketStore ticketStore, IOptionsMonitor<OidcAuthenticationOptions> optionsMonitor)
Parameters
ticketStoreITicketStoreThe store in which the authentication tickets are kept.
optionsMonitorIOptionsMonitor<OidcAuthenticationOptions>The OpenID Connect authentication options.
Methods
PostConfigure(string?, CookieAuthenticationOptions)
Configures the cookie: the ticket store keeps the session, the name comes from CookieName, the expiration is the shorter of
AuthenticationTicketTtl and RefreshTokenLifetime (sliding), and the cookie is essential, SameSite=Lax and secure.
public void PostConfigure(string? name, CookieAuthenticationOptions options)
Parameters
namestringThe name of the options instance.
optionsCookieAuthenticationOptionsThe cookie options to configure.